SQLite Forum

JSON and TCL: is the 'exists' method usable?
Login
Using TCL:
```
% db eval {SELECT json_extract('{"a":15,"b":26}','$.a')}
15
% db exists {SELECT json_extract('{"a":15,"b":26}','$.a')}
1
% db eval {SELECT json_extract('{"a":15,"b":26}','$.c')}
{}
% db exists {SELECT json_extract('{"a":15,"b":26}','$.c')}
1
^------?
```
Ok, 'null' is an actual value in javascript/JSON, but is there any case in which the 'exists' method will return 0/false, or is it unusable with the JSON extension?

Thanks!
dzach