Json

json

The json function is a type conversion function that converts its argument to a JSON value. It supports property access using dot notation.

Spec

json(arg0)

Parameters

arg0 - A string value containing valid JSON.

Return Value

A JSON value that supports property access via dot notation.

Example

Convert a string to JSON and access a property:

datatable(col1:string)["{ \"prop1\": 5 }"]
| project json(col1).prop1
prop1
5

Access nested properties:

datatable(col1:string)["{ \"prop1\": 5, \"prop2\": { \"prop3\": \"abc\" } }"]
| extend val = json(col1)
| project val.prop1, val.prop2.prop3
prop1prop3
5abc