I try to access nested json in the Kusto query via KQL. But I realized that assignedTo and AssignedTo2 are empty.How can I get sub value in nested json via KQL ?
this is my Kusto query :
requests
| extend prop= parse_json(customDimensions.data)
| extend AssignedTo = prop.SYNSTA_SynchronizationStatus
| extend AssignedTo2=customDimensions["data"]["SYNSTA_SynchronizationStatus"]
| where customDimensions['source']=="xxxx"
| project AssignedTo , AssignedTo2
2
Answers
it looks like you can simply use the
coalesce
() function.for example:
if you actually need to modify the
dynamic
object, you can try using thebag_set_key()
functionI want Fullname in customDimensions :
I have reproduced in my environment and got expected results as below:
Then used the below query(modified your code):
Output: