DB2 Expressions - SQL-JSON-PATH-EXPRESSION
An SQL/JSON path expression defines access to the elements of a JSON document.
If an item does not exist, the SQL/JSON path expression returns an empty string, which is handled according to the options specified in a function's ON EMPTY clause.
Special semantics are associated with some characters, when used as part of a SQL/JSON path expression:
To allow these characters to be used within json-path-key-name, use an escape backslash character (\) before these characters to indicate that these characters are part of the key name.
{ "isbn": "123-456-222", "author": [ { "name":"Jones"},{"name","Smith"}]}
{ "person" : {"firstname":"Fred", "lastname":"Gauss"}, "where" : "General Products", "friends" : [ { "name": "Lili","rank": 5 }, {"name": "Hank", "rank": 7} ], "work.area": "Finance" }
{ "a":[{"b1":10}, {"b2":11}], "c":"hi" }
{ "a": [1,2], "b": { "c1":1, "c2":2 } }
1
2