Enhanced Security Measures in Place:   To ensure a safer experience, we’ve implemented additional, temporary security measures for all users.

Split nested JSON

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements

Split nested JSON

L0 Member

I have a field named "ModifiedProperties" and it has values like this below, I cant for the life of me figure out how XQL splits these up, Splunk uses SPAN or MVexpand and it works like a champ but i cant figure out what function does the same thing in XQL.  THANK YOU! 


[
  {
    "Name": "StrongAuthenticationRequirement",
    "NewValue": "[]",
    "OldValue": "[\r\n  {\r\n    \"RelyingParty\": \"*\",\r\n    \"State\": 0,\r\n    \"RememberDevicesNotIssuedBefore\": \"2017-10-13T16:59:21+00:00\",\r\n    \"ConfigStore\": null\r\n  }\r\n]"
  },
  {
    "Name": "Included Updated Properties",
    "NewValue": "StrongAuthenticationRequirement",
    "OldValue": ""
  },
  {
    "Name": "TargetId.UserType",
    "NewValue": "Member",
    "OldValue": ""
  }
]
1 REPLY 1

L2 Linker

Which key are you trying to extract?

For e.g: we can extract name key from all jsons within the array as below.

alter namearr=arraymap (modifiedproperties,"@element"->Name)

|Arrayexpand namearr.

This way we will get the Name key expanded. 

  • 175 Views
  • 1 replies
  • 0 Likes
Like what you see?

Show your appreciation!

Click Like if a post is helpful to you or if you just want to show your support.

Click Accept as Solution to acknowledge that the answer to your question has been provided.

The button appears next to the replies on topics you’ve started. The member who gave the solution and all future visitors to this topic will appreciate it!

These simple actions take just seconds of your time, but go a long way in showing appreciation for community members and the LIVEcommunity as a whole!

The LIVEcommunity thanks you for your participation!