Reputation: 7383
I would like to use the variable settingName
for the dynamic json property. How can i accomplish that?
let settingName = 'LaunchNext';
DSEvents
| where Timestamp > ago(1d) and Data contains (settingName)
| summarize count() by tostring(parsejson(tostring(Data.Settings)).LaunchNext.value)
I want to substitute the variable instead of the actual property
parsejson(tostring(Data.Settings)).LaunchNext.value
Upvotes: 0
Views: 158
Reputation: 7383
Enclosing the variable in []
worked for me
tostring(parsejson(tostring(Data.Settings)).[settingName].value)
Upvotes: 0