I have below structure json object
{
"records": [
{
"key": "be4kf29j",
"value": {
"channelId": "Connect"
}
}
]
}
I am trying to retrieve all the key values. Below is the KQL query i am using. but i am unbale retrieve the "key" field values.
let js = '{"records":[{"key":"be4kf29j","value":{"channelId":"Connect"}}]}';
let recs = parse_json(js);
recs
| mv-expand dd = recs.records
| extend key = tostring(dd.key)
Can somebody guide me what i am missing.
The parse_json does take a bit of getting used to.
In your particular cases the following worked for me.
Of if you're using it from a table something like this should work.