<?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 json_extract_array do not return result in Cortex XDR Discussions</title>
    <link>https://live.paloaltonetworks.com/t5/cortex-xdr-discussions/json-extract-array-do-not-return-result/m-p/595580#M7100</link>
    <description>&lt;P&gt;I've got json like below and trying to extract each key_name via json_extract_array but getting empty column vendor&lt;/P&gt;
&lt;P&gt;query is&lt;/P&gt;
&lt;P&gt;dataset = host_inventory&lt;/P&gt;
&lt;P&gt;| fields application as aps&lt;/P&gt;
&lt;P&gt;| alter vendor = json_extract_array(to_json_string(aps),"$.key_name")&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="font-weight: 400;"&gt;[&amp;nbsp;&lt;/P&gt;
&lt;P style="font-weight: 400;"&gt;&amp;nbsp;{&lt;/P&gt;
&lt;P style="font-weight: 400;"&gt;&amp;nbsp; &amp;nbsp; "identifier": null,&lt;/P&gt;
&lt;P style="font-weight: 400;"&gt;&amp;nbsp; &amp;nbsp; "install_date": "2021-01-12",&lt;/P&gt;
&lt;P style="font-weight: 400;"&gt;&amp;nbsp; &amp;nbsp; "installed_for_sid": "global",&lt;/P&gt;
&lt;P style="font-weight: 400;"&gt;&amp;nbsp; &amp;nbsp; "is_from_appstore": null,&lt;/P&gt;
&lt;P style="font-weight: 400;"&gt;&amp;nbsp; &amp;nbsp; "key_name": "{DB1CD517-ED68-464C-A797-7C3D29B3CB27}",&lt;/P&gt;
&lt;P style="font-weight: 400;"&gt;&amp;nbsp; &amp;nbsp; "manager_name": "windows",&lt;/P&gt;
&lt;P style="font-weight: 400;"&gt;&amp;nbsp; &amp;nbsp; "application_name": "VNC Server 6.7.2",&lt;/P&gt;
&lt;P style="font-weight: 400;"&gt;&amp;nbsp; &amp;nbsp; "raw_version": "6.7.2.42622",&lt;/P&gt;
&lt;P style="font-weight: 400;"&gt;&amp;nbsp; &amp;nbsp; "uninstall_string": "MsiExec.exe /I{DB1CD517-ED68-464C-A797-7C3D29B3CB27}",&lt;/P&gt;
&lt;P style="font-weight: 400;"&gt;&amp;nbsp; &amp;nbsp; "url_info_about": "&lt;A href="https://www.realvnc.com" target="_blank"&gt;https://www.realvnc.com&lt;/A&gt;",&lt;/P&gt;
&lt;P style="font-weight: 400;"&gt;&amp;nbsp; &amp;nbsp; "url_update_info": "",&lt;/P&gt;
&lt;P style="font-weight: 400;"&gt;&amp;nbsp; &amp;nbsp; "vendor": "RealVNC Ltd",&lt;/P&gt;
&lt;P style="font-weight: 400;"&gt;&amp;nbsp; &amp;nbsp; "version": "6.7.2.42622",&lt;/P&gt;
&lt;P style="font-weight: 400;"&gt;&amp;nbsp; &amp;nbsp; "win_installer": true&lt;/P&gt;
&lt;P style="font-weight: 400;"&gt;&amp;nbsp; },&lt;/P&gt;
&lt;P style="font-weight: 400;"&gt;&amp;nbsp; {&lt;/P&gt;
&lt;P style="font-weight: 400;"&gt;&amp;nbsp; &amp;nbsp; "identifier": null,&lt;/P&gt;
&lt;P style="font-weight: 400;"&gt;&amp;nbsp; &amp;nbsp; "install_date": "2024-08-14",&lt;/P&gt;
&lt;P style="font-weight: 400;"&gt;&amp;nbsp; &amp;nbsp; "installed_for_sid": "global",&lt;/P&gt;
&lt;P style="font-weight: 400;"&gt;&amp;nbsp; &amp;nbsp; "is_from_appstore": null,&lt;/P&gt;
&lt;P style="font-weight: 400;"&gt;&amp;nbsp; &amp;nbsp; "key_name": "{EAD0DD81-531A-4ECA-84DB-87BDB40B15DA}",&lt;/P&gt;
&lt;P style="font-weight: 400;"&gt;&amp;nbsp; &amp;nbsp; "manager_name": "windows",&lt;/P&gt;
&lt;P style="font-weight: 400;"&gt;&amp;nbsp; &amp;nbsp; "application_name": "Cortex XDR 8.4.1.53273",&lt;/P&gt;
&lt;P style="font-weight: 400;"&gt;&amp;nbsp; &amp;nbsp; "raw_version": "8.4.1.53273",&lt;/P&gt;
&lt;P style="font-weight: 400;"&gt;&amp;nbsp; &amp;nbsp; "uninstall_string": "MsiExec.exe /X{EAD0DD81-531A-4ECA-84DB-87BDB40B15DA}",&lt;/P&gt;
&lt;P style="font-weight: 400;"&gt;&amp;nbsp; &amp;nbsp; "url_info_about": "",&lt;/P&gt;
&lt;P style="font-weight: 400;"&gt;&amp;nbsp; &amp;nbsp; "url_update_info": "",&lt;/P&gt;
&lt;P style="font-weight: 400;"&gt;&amp;nbsp; &amp;nbsp; "vendor": "Palo Alto Networks, Inc.",&lt;/P&gt;
&lt;P style="font-weight: 400;"&gt;&amp;nbsp; &amp;nbsp; "version": "8.4.1.53273",&lt;/P&gt;
&lt;P style="font-weight: 400;"&gt;&amp;nbsp; &amp;nbsp; "win_installer": true&lt;/P&gt;
&lt;P style="font-weight: 400;"&gt;&amp;nbsp; }&lt;/P&gt;
&lt;P style="font-weight: 400;"&gt;]&lt;/P&gt;</description>
    <pubDate>Thu, 22 Aug 2024 05:53:38 GMT</pubDate>
    <dc:creator>tualantin</dc:creator>
    <dc:date>2024-08-22T05:53:38Z</dc:date>
    <item>
      <title>json_extract_array do not return result</title>
      <link>https://live.paloaltonetworks.com/t5/cortex-xdr-discussions/json-extract-array-do-not-return-result/m-p/595580#M7100</link>
      <description>&lt;P&gt;I've got json like below and trying to extract each key_name via json_extract_array but getting empty column vendor&lt;/P&gt;
&lt;P&gt;query is&lt;/P&gt;
&lt;P&gt;dataset = host_inventory&lt;/P&gt;
&lt;P&gt;| fields application as aps&lt;/P&gt;
&lt;P&gt;| alter vendor = json_extract_array(to_json_string(aps),"$.key_name")&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="font-weight: 400;"&gt;[&amp;nbsp;&lt;/P&gt;
&lt;P style="font-weight: 400;"&gt;&amp;nbsp;{&lt;/P&gt;
&lt;P style="font-weight: 400;"&gt;&amp;nbsp; &amp;nbsp; "identifier": null,&lt;/P&gt;
&lt;P style="font-weight: 400;"&gt;&amp;nbsp; &amp;nbsp; "install_date": "2021-01-12",&lt;/P&gt;
&lt;P style="font-weight: 400;"&gt;&amp;nbsp; &amp;nbsp; "installed_for_sid": "global",&lt;/P&gt;
&lt;P style="font-weight: 400;"&gt;&amp;nbsp; &amp;nbsp; "is_from_appstore": null,&lt;/P&gt;
&lt;P style="font-weight: 400;"&gt;&amp;nbsp; &amp;nbsp; "key_name": "{DB1CD517-ED68-464C-A797-7C3D29B3CB27}",&lt;/P&gt;
&lt;P style="font-weight: 400;"&gt;&amp;nbsp; &amp;nbsp; "manager_name": "windows",&lt;/P&gt;
&lt;P style="font-weight: 400;"&gt;&amp;nbsp; &amp;nbsp; "application_name": "VNC Server 6.7.2",&lt;/P&gt;
&lt;P style="font-weight: 400;"&gt;&amp;nbsp; &amp;nbsp; "raw_version": "6.7.2.42622",&lt;/P&gt;
&lt;P style="font-weight: 400;"&gt;&amp;nbsp; &amp;nbsp; "uninstall_string": "MsiExec.exe /I{DB1CD517-ED68-464C-A797-7C3D29B3CB27}",&lt;/P&gt;
&lt;P style="font-weight: 400;"&gt;&amp;nbsp; &amp;nbsp; "url_info_about": "&lt;A href="https://www.realvnc.com" target="_blank"&gt;https://www.realvnc.com&lt;/A&gt;",&lt;/P&gt;
&lt;P style="font-weight: 400;"&gt;&amp;nbsp; &amp;nbsp; "url_update_info": "",&lt;/P&gt;
&lt;P style="font-weight: 400;"&gt;&amp;nbsp; &amp;nbsp; "vendor": "RealVNC Ltd",&lt;/P&gt;
&lt;P style="font-weight: 400;"&gt;&amp;nbsp; &amp;nbsp; "version": "6.7.2.42622",&lt;/P&gt;
&lt;P style="font-weight: 400;"&gt;&amp;nbsp; &amp;nbsp; "win_installer": true&lt;/P&gt;
&lt;P style="font-weight: 400;"&gt;&amp;nbsp; },&lt;/P&gt;
&lt;P style="font-weight: 400;"&gt;&amp;nbsp; {&lt;/P&gt;
&lt;P style="font-weight: 400;"&gt;&amp;nbsp; &amp;nbsp; "identifier": null,&lt;/P&gt;
&lt;P style="font-weight: 400;"&gt;&amp;nbsp; &amp;nbsp; "install_date": "2024-08-14",&lt;/P&gt;
&lt;P style="font-weight: 400;"&gt;&amp;nbsp; &amp;nbsp; "installed_for_sid": "global",&lt;/P&gt;
&lt;P style="font-weight: 400;"&gt;&amp;nbsp; &amp;nbsp; "is_from_appstore": null,&lt;/P&gt;
&lt;P style="font-weight: 400;"&gt;&amp;nbsp; &amp;nbsp; "key_name": "{EAD0DD81-531A-4ECA-84DB-87BDB40B15DA}",&lt;/P&gt;
&lt;P style="font-weight: 400;"&gt;&amp;nbsp; &amp;nbsp; "manager_name": "windows",&lt;/P&gt;
&lt;P style="font-weight: 400;"&gt;&amp;nbsp; &amp;nbsp; "application_name": "Cortex XDR 8.4.1.53273",&lt;/P&gt;
&lt;P style="font-weight: 400;"&gt;&amp;nbsp; &amp;nbsp; "raw_version": "8.4.1.53273",&lt;/P&gt;
&lt;P style="font-weight: 400;"&gt;&amp;nbsp; &amp;nbsp; "uninstall_string": "MsiExec.exe /X{EAD0DD81-531A-4ECA-84DB-87BDB40B15DA}",&lt;/P&gt;
&lt;P style="font-weight: 400;"&gt;&amp;nbsp; &amp;nbsp; "url_info_about": "",&lt;/P&gt;
&lt;P style="font-weight: 400;"&gt;&amp;nbsp; &amp;nbsp; "url_update_info": "",&lt;/P&gt;
&lt;P style="font-weight: 400;"&gt;&amp;nbsp; &amp;nbsp; "vendor": "Palo Alto Networks, Inc.",&lt;/P&gt;
&lt;P style="font-weight: 400;"&gt;&amp;nbsp; &amp;nbsp; "version": "8.4.1.53273",&lt;/P&gt;
&lt;P style="font-weight: 400;"&gt;&amp;nbsp; &amp;nbsp; "win_installer": true&lt;/P&gt;
&lt;P style="font-weight: 400;"&gt;&amp;nbsp; }&lt;/P&gt;
&lt;P style="font-weight: 400;"&gt;]&lt;/P&gt;</description>
      <pubDate>Thu, 22 Aug 2024 05:53:38 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/cortex-xdr-discussions/json-extract-array-do-not-return-result/m-p/595580#M7100</guid>
      <dc:creator>tualantin</dc:creator>
      <dc:date>2024-08-22T05:53:38Z</dc:date>
    </item>
    <item>
      <title>Re: json_extract_array do not return result</title>
      <link>https://live.paloaltonetworks.com/t5/cortex-xdr-discussions/json-extract-array-do-not-return-result/m-p/595775#M7106</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://live.paloaltonetworks.com/t5/user/viewprofilepage/user-id/57389"&gt;@tualantin&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks for reaching out on LiveCommunity!&lt;/P&gt;
&lt;P&gt;Please try using below query.&lt;/P&gt;
&lt;P&gt;dataset = host_inventory&lt;BR /&gt;| arrayexpand applications&lt;BR /&gt;| alter vendor = json_extract(applications,"$.key_name")&lt;BR /&gt;| filter (vendor not in (null, """""")) &lt;BR /&gt;| fields applications , vendor &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please c&lt;SPAN&gt;lick&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;Accept as Solution&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;to acknowledge that the answer to your question has been provided.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 23 Aug 2024 16:57:27 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/cortex-xdr-discussions/json-extract-array-do-not-return-result/m-p/595775#M7106</guid>
      <dc:creator>nsinghvirk</dc:creator>
      <dc:date>2024-08-23T16:57:27Z</dc:date>
    </item>
  </channel>
</rss>

