JSON_PATH#
Returns nodes selected with XPath expression.
Syntax#
JSON_PATH ( 'json_data', 'xpath' )
Arguments#
‘json_data’
Is a character expression of type nvarchar.
‘_xpath_’
Is a character expression of type nvarchar. The expression is used to select nodes in json_data.
Return types#
nvarchar(128)
Example#
SELECT JSON_PATH(
N'[{"faceAttributes":{"age":27.5,"gender":"male"}}]',
'$[0].faceAttributes.age') as age