<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Split nested JSON in Cortex XDR Discussions</title>
    <link>https://live.paloaltonetworks.com/t5/cortex-xdr-discussions/split-nested-json/m-p/1227114#M8245</link>
    <description>&lt;P&gt;HI&amp;nbsp;&lt;a href="https://live.paloaltonetworks.com/t5/user/viewprofilepage/user-id/1263562001"&gt;@D.Demarest&lt;/a&gt;, I am having the exact same issue with the same field. Were you ever able to figure out a solution to this?&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 22 Apr 2025 12:46:45 GMT</pubDate>
    <dc:creator>justin_smi</dc:creator>
    <dc:date>2025-04-22T12:46:45Z</dc:date>
    <item>
      <title>Split nested JSON</title>
      <link>https://live.paloaltonetworks.com/t5/cortex-xdr-discussions/split-nested-json/m-p/606052#M7341</link>
      <description>&lt;P&gt;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.&amp;nbsp; THANK YOU!&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;[&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;{&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;"Name"&lt;/SPAN&gt;&lt;SPAN&gt;:&lt;/SPAN&gt; &lt;SPAN&gt;"StrongAuthenticationRequirement"&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;"NewValue"&lt;/SPAN&gt;&lt;SPAN&gt;:&lt;/SPAN&gt; &lt;SPAN&gt;"[]"&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;"OldValue"&lt;/SPAN&gt;&lt;SPAN&gt;:&lt;/SPAN&gt; &lt;SPAN&gt;"[\r\n &amp;nbsp;{\r\n &amp;nbsp; &amp;nbsp;\"RelyingParty\": \"*\",\r\n &amp;nbsp; &amp;nbsp;\"State\": 0,\r\n &amp;nbsp; &amp;nbsp;\"RememberDevicesNotIssuedBefore\": \"2017-10-13T16:59:21+00:00\",\r\n &amp;nbsp; &amp;nbsp;\"ConfigStore\": null\r\n &amp;nbsp;}\r\n]"&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;},&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;{&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;"Name"&lt;/SPAN&gt;&lt;SPAN&gt;:&lt;/SPAN&gt; &lt;SPAN&gt;"Included Updated Properties"&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;"NewValue"&lt;/SPAN&gt;&lt;SPAN&gt;:&lt;/SPAN&gt; &lt;S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;&lt;/DIV&gt;
&lt;/DIV&gt;</description>
      <pubDate>Thu, 17 Oct 2024 16:15:18 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/cortex-xdr-discussions/split-nested-json/m-p/606052#M7341</guid>
      <dc:creator>D.Demarest</dc:creator>
      <dc:date>2024-10-17T16:15:18Z</dc:date>
    </item>
    <item>
      <title>Re: Split nested JSON</title>
      <link>https://live.paloaltonetworks.com/t5/cortex-xdr-discussions/split-nested-json/m-p/606943#M7351</link>
      <description>&lt;P&gt;Which key are you trying to extract?&lt;/P&gt;
&lt;P&gt;For e.g: we can extract name key from all jsons within the array as below.&lt;/P&gt;
&lt;P&gt;alter namearr=arraymap (modifiedproperties,"@element"-&amp;gt;Name)&lt;/P&gt;
&lt;P&gt;|Arrayexpand namearr.&lt;/P&gt;
&lt;P&gt;This way we will get the Name key expanded.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 18 Oct 2024 18:44:20 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/cortex-xdr-discussions/split-nested-json/m-p/606943#M7351</guid>
      <dc:creator>Fm12345</dc:creator>
      <dc:date>2024-10-18T18:44:20Z</dc:date>
    </item>
    <item>
      <title>Re: Split nested JSON</title>
      <link>https://live.paloaltonetworks.com/t5/cortex-xdr-discussions/split-nested-json/m-p/1227114#M8245</link>
      <description>&lt;P&gt;HI&amp;nbsp;&lt;a href="https://live.paloaltonetworks.com/t5/user/viewprofilepage/user-id/1263562001"&gt;@D.Demarest&lt;/a&gt;, I am having the exact same issue with the same field. Were you ever able to figure out a solution to this?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 22 Apr 2025 12:46:45 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/cortex-xdr-discussions/split-nested-json/m-p/1227114#M8245</guid>
      <dc:creator>justin_smi</dc:creator>
      <dc:date>2025-04-22T12:46:45Z</dc:date>
    </item>
    <item>
      <title>Re: Split nested JSON</title>
      <link>https://live.paloaltonetworks.com/t5/cortex-xdr-discussions/split-nested-json/m-p/1227123#M8246</link>
      <description>&lt;P&gt;hi&amp;nbsp;&lt;a href="https://live.paloaltonetworks.com/t5/user/viewprofilepage/user-id/238605"&gt;@justin_smi&lt;/a&gt;&amp;nbsp;,&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;So the way i got it to work was something like this:&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;|alter newgroup = json_extract(targetResources, "$[0].modifiedProperties[1].newValue")&lt;/P&gt;
&lt;P&gt;&lt;LI-WRAPPER&gt;&lt;I&gt;&lt;/I&gt;&lt;/LI-WRAPPER&gt;&lt;BR /&gt;targetResources is the field name, then its the zero index plus the parent parent key/pair then you use the index of the field you want out&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 22 Apr 2025 14:13:47 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/cortex-xdr-discussions/split-nested-json/m-p/1227123#M8246</guid>
      <dc:creator>D.Demarest</dc:creator>
      <dc:date>2025-04-22T14:13:47Z</dc:date>
    </item>
  </channel>
</rss>

