json_type(JsonDocument)
The json_type
function returns the type of the JSON object or element.
Valid responses are:
Assuming a field Json
containing:
"items" : [
"Num" : 1,
"Text" : "The Name",
"First" : true
,
"Num" : 2.0,
"Text" : "The second one",
"First" : false
,
null
]
json_type(Json): OBJECT
json_type(Json.$.items[0]): OBJECT
json_type(Json.$.items): ARRAY
json_type(Json.$.items[0].Num): INTEGER
json_type(Json.$.items[1].Num): DOUBLE
json_type(Json.$.items[0].Text): STRING
json_type(Json.$.items[0].First): BOOLEAN
json_type(Json.$.items[2]): NULL