json_value(JsonDocument, Path)
The json_value
extracts the value identified by Path
from
JsonDocument
. Path
is a varchar in the JSON Path Syntax.
This will return a scalar value. If Path
refers to an array,
object, or invalid path no value is returned.
Assuming the same Json field from the previous examples:
json_value(Json, '$'):
json_value(Json, '$.items[0]'):
json_value(Json, '$.items'):
json_value(Json, '$.items[0].Num'): 1
json_value(Json, '$.items[1].Num'): 2.0
json_value(Json, '$.items[0].Text'): The Name
json_value(Json, '$.items[0].First'): true
json_value(Json, '$.items[2]'):