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(
    DETECT_FACES(
        LOAD_FILE('http://local-content.local/img09.jpg'),
            'https://westus.api.cognitive.microsoft.com/face/v1.0/detect',
            'cf23df2207d99a74fbe169e3eba035e6'),
            '$[0].faceAttributes.age') as age

See Also#