Hudson Carpenter
Hudson Carpenter

Reputation: 39

How to parse a string in brackets and double quotes KQL

Fairly simple question but due to how new I am at KQL I am struggling to figure out how to do this properly. I want to parse a string that has ["name"]. Currently I am doing | parse Tags_s * "[" Tags and then just end up getting "name"] as a result. I tried parsing in the quotes but every time I do I just bring back empty data. Any help would be appreciated.

Upvotes: 0

Views: 2762

Answers (1)

David דודו Markovitz
David דודו Markovitz

Reputation: 44991

print Tags_s = '["name"]'
| parse Tags_s with '["' tag_name '"]' 
Tags_s tag_name
["name"] name

Fiddle

Upvotes: 2

Related Questions