Forum Discussion
Internal fields have multiple values in Parsers
You can write parser similar to this,
e.g.
SigninLogs {Table Name}
AuthenticationDetails {Field Name}
[0:authenticationMethod
0: authenticationStepRequirement]
[1: authenticationStepRequirement]
[2: authenticationMethod]
Parser:
SigninLogs
| extend AuthenticationMethod = tostring(parse_json(AuthenticationDetails)[0].authenticationMethod)
| extend authenticationStepRequirement = tostring(parse_json(AuthenticationDetails)[0].authenticationStepRequirement)
| extend authenticationStepRequirement1 = tostring (parse_json(AuthenticationDetails)[1].authenticationStepRequirement)
| extend authenticationMethod = tostring(parse_json(AuthenticationDetails)[2].authenticationMethod)
| project AuthenticationMethod, authenticationStepRequirement,authenticationStepRequirement1,authenticationMethod
Or you can share sample logs for better help.
- Ronak_ShahAug 24, 2021Copper Contributor
Hi, Thanks for your response
Actually in the above method suggested, it will be only possible if we know the length of the list, or we know how many dictionary items are present in the list.
If in the example I provideda = [
{b: null, c: "string1"},
{b: "string2", c: "string3"}
.....
{b: "string3", c: "null"}]
we don't know the length, then how should I implement the logic.- Aug 25, 2021
Hi Ronak_Shah,
Try this code,
SigninLogs | project DeviceDetail | evaluate bag_unpack(DeviceDetail)bag_unpack will Parse all the values inside it .
Check this Blog: https://www.cloudsma.com/2020/01/extracting-nested-fields-kusto/