You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
The idea is to add some functions to query and manipulate JSON.
Also see https://modern-sql.com/blog/2017-06/whats-new-in-sql-2016
Construction
json_object(k1,v1[,kn,vn]*)
- constructor function that creates a json objectjson_array(v1[,vn]*)
- constructor function that creates a json arrayjson_parse(payload)
- parses a json objectQuery
json_arrayagg(any) within group (...)
- aggregates json objects into a json arrayjson_objectagg(key, value)
- aggregates key-values into a single json objectjson_value(json, jsonpath [returning <type>] )
- returns a scalar value for the path where can be number, boolean or string (default)json_exists(json, jsonpath)
true if the JSON document contains a value for the path expression, and false otherwisejson_query(json, jsonpath)
returns a json documentManipulation
json_concat(json, json)
json_set(json, jsonpath, element)
- returns a JSON having the given path set with the given elementTrack HHH-18496 for progress.
Beta Was this translation helpful? Give feedback.
All reactions