<?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 XQL : Need help with json_extract in Cortex XDR Discussions</title>
    <link>https://live.paloaltonetworks.com/t5/cortex-xdr-discussions/xql-need-help-with-json-extract/m-p/592296#M6936</link>
    <description>&lt;P&gt;Dear Community,&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;I was trying to use the json_extract to extract the value of "RuleActions" and have no success so far.&lt;BR /&gt;&lt;BR /&gt;Sample data:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;{"RuleOperation":"AddMailboxRule","RuleId":"0","RuleState":"Enabled, ExitAfterExecution","RuleCondition":"{(SubString IgnoreCase(SubjectProperty)=ABC Communication)}","RuleName":"ABC Communication","RuleProvider":"RuleOrganizer","RuleActions":"[{"ActionType":"Move","DestinationFolderId":"LgAAAAAugyiuv11hR6F4h74ucfwGAASDFVCEqNKZSaN2wuruT03jAAC7WAXhAAAB","FolderIsInThisStore":"True"}]"}&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The value is always turned out to be "[{" instead of "[{"ActionType":"Move","DestinationFolderId":"LgAAAAAugyiuv11hR6F4h74ucfwGAASDFVCEqNKZSaN2wuruT03jAAC7WAXhAAAB","FolderIsInThisStore":"True"}]"&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The syntax that I'm using is&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;RuleActions = json_extract(OperationProperties, "$.RuleActions")&lt;/LI-CODE&gt;
&lt;P&gt;FYI, I've tried json_extract_scalar, json_extract_array, json_extract_scalar_array and have no success.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you in advance!&lt;BR /&gt;&lt;BR /&gt;&lt;LI-PRODUCT title="Cortex XDR" id="Cortex_XDR"&gt;&lt;/LI-PRODUCT&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 17 Jul 2024 08:54:28 GMT</pubDate>
    <dc:creator>Antony_Chan</dc:creator>
    <dc:date>2024-07-17T08:54:28Z</dc:date>
    <item>
      <title>XQL : Need help with json_extract</title>
      <link>https://live.paloaltonetworks.com/t5/cortex-xdr-discussions/xql-need-help-with-json-extract/m-p/592296#M6936</link>
      <description>&lt;P&gt;Dear Community,&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;I was trying to use the json_extract to extract the value of "RuleActions" and have no success so far.&lt;BR /&gt;&lt;BR /&gt;Sample data:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;{"RuleOperation":"AddMailboxRule","RuleId":"0","RuleState":"Enabled, ExitAfterExecution","RuleCondition":"{(SubString IgnoreCase(SubjectProperty)=ABC Communication)}","RuleName":"ABC Communication","RuleProvider":"RuleOrganizer","RuleActions":"[{"ActionType":"Move","DestinationFolderId":"LgAAAAAugyiuv11hR6F4h74ucfwGAASDFVCEqNKZSaN2wuruT03jAAC7WAXhAAAB","FolderIsInThisStore":"True"}]"}&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The value is always turned out to be "[{" instead of "[{"ActionType":"Move","DestinationFolderId":"LgAAAAAugyiuv11hR6F4h74ucfwGAASDFVCEqNKZSaN2wuruT03jAAC7WAXhAAAB","FolderIsInThisStore":"True"}]"&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The syntax that I'm using is&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;RuleActions = json_extract(OperationProperties, "$.RuleActions")&lt;/LI-CODE&gt;
&lt;P&gt;FYI, I've tried json_extract_scalar, json_extract_array, json_extract_scalar_array and have no success.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you in advance!&lt;BR /&gt;&lt;BR /&gt;&lt;LI-PRODUCT title="Cortex XDR" id="Cortex_XDR"&gt;&lt;/LI-PRODUCT&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 17 Jul 2024 08:54:28 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/cortex-xdr-discussions/xql-need-help-with-json-extract/m-p/592296#M6936</guid>
      <dc:creator>Antony_Chan</dc:creator>
      <dc:date>2024-07-17T08:54:28Z</dc:date>
    </item>
    <item>
      <title>Re: XQL : Need help with json_extract</title>
      <link>https://live.paloaltonetworks.com/t5/cortex-xdr-discussions/xql-need-help-with-json-extract/m-p/592464#M6953</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://live.paloaltonetworks.com/t5/user/viewprofilepage/user-id/202190"&gt;@Antony_Chan&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks for reaching out on Live Community!&lt;/P&gt;
&lt;P&gt;Please try following query format if you are looking for Action type value or replace it with whichever field you want.&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;RuleActions = json_extract(OperationProperties, "$.RuleActions.ActionType")&lt;/LI-CODE&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>Thu, 18 Jul 2024 14:35:53 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/cortex-xdr-discussions/xql-need-help-with-json-extract/m-p/592464#M6953</guid>
      <dc:creator>nsinghvirk</dc:creator>
      <dc:date>2024-07-18T14:35:53Z</dc:date>
    </item>
  </channel>
</rss>

