<?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: Issue while usin 'JQ' Transformer in Cortex XSOAR Discussions</title>
    <link>https://live.paloaltonetworks.com/t5/cortex-xsoar-discussions/issue-while-usin-jq-transformer/m-p/549778#M2329</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://live.paloaltonetworks.com/t5/user/viewprofilepage/user-id/303827"&gt;@NicolasTHOMAS&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Can I ask why you need JQ? If you click the&amp;nbsp;&lt;STRONG&gt;Choose data path&lt;/STRONG&gt; next to the field and click&amp;nbsp;&lt;STRONG&gt;category&amp;nbsp;&lt;/STRONG&gt;the path will be automatically added and it will be valid for all JSON input for that specific mapper. If you explain what you are trying to achieve I can try to help further. Please see the below screenshot.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="gyldz_0-1689674887177.png" style="width: 400px;"&gt;&lt;img src="https://live.paloaltonetworks.com/t5/image/serverpage/image-id/51720i468F6BF1941E28AC/image-size/medium/is-moderation-mode/true?v=v2&amp;amp;px=400" role="button" title="gyldz_0-1689674887177.png" alt="gyldz_0-1689674887177.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 18 Jul 2023 10:08:32 GMT</pubDate>
    <dc:creator>gyldz</dc:creator>
    <dc:date>2023-07-18T10:08:32Z</dc:date>
    <item>
      <title>Issue while usin 'JQ' Transformer</title>
      <link>https://live.paloaltonetworks.com/t5/cortex-xsoar-discussions/issue-while-usin-jq-transformer/m-p/549628#M2324</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Hello,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I would like to use 'jq' Transformer as designed in a custom "Mapper", but it constantly says to me that error message, whatever I am testing :&lt;/SPAN&gt;&lt;BR /&gt;&lt;STRONG&gt;===&amp;gt; "Result: Failed to execute jq. Error: the JSON object must be str, bytes or bytearray, not dict"&lt;/STRONG&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Event though I tried barely everything in order to be able to test it, as you would be able to see it on enclosed screenshot, and as well on the simplest example here :&amp;nbsp;&lt;/SPAN&gt;&lt;A href="https://jqplay.org/s/JTzcQNL1ui2" target="_blank" rel="noopener"&gt;https://jqplay.org/s/JTzcQNL1ui2&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I tried .category,&amp;nbsp; ."category",&amp;nbsp; .{"category"},&amp;nbsp;&amp;nbsp;.["category"],&amp;nbsp; [.category] and all variations, with the table as well or with .id,&amp;nbsp; ."id", .'id'... etc...etc...etc...&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;&lt;SPAN&gt;Many thanks in advance for your reply and Best Regards,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Thomas Nicolas&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 17 Jul 2023 19:14:04 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/cortex-xsoar-discussions/issue-while-usin-jq-transformer/m-p/549628#M2324</guid>
      <dc:creator>NicolasTHOMAS</dc:creator>
      <dc:date>2023-07-17T19:14:04Z</dc:date>
    </item>
    <item>
      <title>Re: Issue while usin 'JQ' Transformer</title>
      <link>https://live.paloaltonetworks.com/t5/cortex-xsoar-discussions/issue-while-usin-jq-transformer/m-p/549778#M2329</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://live.paloaltonetworks.com/t5/user/viewprofilepage/user-id/303827"&gt;@NicolasTHOMAS&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Can I ask why you need JQ? If you click the&amp;nbsp;&lt;STRONG&gt;Choose data path&lt;/STRONG&gt; next to the field and click&amp;nbsp;&lt;STRONG&gt;category&amp;nbsp;&lt;/STRONG&gt;the path will be automatically added and it will be valid for all JSON input for that specific mapper. If you explain what you are trying to achieve I can try to help further. Please see the below screenshot.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="gyldz_0-1689674887177.png" style="width: 400px;"&gt;&lt;img src="https://live.paloaltonetworks.com/t5/image/serverpage/image-id/51720i468F6BF1941E28AC/image-size/medium/is-moderation-mode/true?v=v2&amp;amp;px=400" role="button" title="gyldz_0-1689674887177.png" alt="gyldz_0-1689674887177.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 18 Jul 2023 10:08:32 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/cortex-xsoar-discussions/issue-while-usin-jq-transformer/m-p/549778#M2329</guid>
      <dc:creator>gyldz</dc:creator>
      <dc:date>2023-07-18T10:08:32Z</dc:date>
    </item>
    <item>
      <title>Re: Issue while usin 'JQ' Transformer</title>
      <link>https://live.paloaltonetworks.com/t5/cortex-xsoar-discussions/issue-while-usin-jq-transformer/m-p/549799#M2330</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I would like to use JQ as we are fetching different incidents, with different fields to map, and I would like to do a dynamic mapping of&amp;nbsp;@odata.comments[] tables our @odata.evidence[] (sometimes several evidences table, @odata.evidence[0], @odata.evidence[1], @odata.evidence[2])&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards,&lt;BR /&gt;Thomas Nicolas&lt;/P&gt;</description>
      <pubDate>Tue, 18 Jul 2023 12:09:18 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/cortex-xsoar-discussions/issue-while-usin-jq-transformer/m-p/549799#M2330</guid>
      <dc:creator>NicolasTHOMAS</dc:creator>
      <dc:date>2023-07-18T12:09:18Z</dc:date>
    </item>
    <item>
      <title>Re: Issue while usin 'JQ' Transformer</title>
      <link>https://live.paloaltonetworks.com/t5/cortex-xsoar-discussions/issue-while-usin-jq-transformer/m-p/549853#M2338</link>
      <description>&lt;P&gt;That error looks like it wants you to use the stringify operator prior to using the jq operator. I wasn't able to test since I don't have that jq transformer in my instance. I was able to use the DT transformer to parse out that category.&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot 2023-07-18 at 10.26.59 AM.png" style="width: 778px;"&gt;&lt;img src="https://live.paloaltonetworks.com/t5/image/serverpage/image-id/51734i59248D3A8862EB2F/image-size/large/is-moderation-mode/true?v=v2&amp;amp;px=999" role="button" title="Screenshot 2023-07-18 at 10.26.59 AM.png" alt="Screenshot 2023-07-18 at 10.26.59 AM.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Instead of using DT or jq or another transformer though, I would try to use classifiers and mappers to map the data as needed. You can classify the data into different incident types with a classifier. Once you have the different incident types, you can then use an incoming mapper to map the fields per incident type. Below you can see where I map the field Alert Category based on 2 different inputs depending on which incident type is created by the classifier.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot 2023-07-18 at 10.32.50 AM.png" style="width: 782px;"&gt;&lt;img src="https://live.paloaltonetworks.com/t5/image/serverpage/image-id/51735iE0F6F96EFFD8D787/image-size/large/is-moderation-mode/true?v=v2&amp;amp;px=999" role="button" title="Screenshot 2023-07-18 at 10.32.50 AM.png" alt="Screenshot 2023-07-18 at 10.32.50 AM.png" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot 2023-07-18 at 10.32.37 AM.png" style="width: 787px;"&gt;&lt;img src="https://live.paloaltonetworks.com/t5/image/serverpage/image-id/51736i651F77F42C2044AA/image-size/large/is-moderation-mode/true?v=v2&amp;amp;px=999" role="button" title="Screenshot 2023-07-18 at 10.32.37 AM.png" alt="Screenshot 2023-07-18 at 10.32.37 AM.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 18 Jul 2023 17:33:49 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/cortex-xsoar-discussions/issue-while-usin-jq-transformer/m-p/549853#M2338</guid>
      <dc:creator>amontminy</dc:creator>
      <dc:date>2023-07-18T17:33:49Z</dc:date>
    </item>
    <item>
      <title>Re: Issue while usin 'JQ' Transformer</title>
      <link>https://live.paloaltonetworks.com/t5/cortex-xsoar-discussions/issue-while-usin-jq-transformer/m-p/549855#M2340</link>
      <description>&lt;P&gt;Ok, so you think it is not possible to parse a JSON array or a JSON Object ?&lt;/P&gt;</description>
      <pubDate>Tue, 18 Jul 2023 17:36:23 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/cortex-xsoar-discussions/issue-while-usin-jq-transformer/m-p/549855#M2340</guid>
      <dc:creator>NicolasTHOMAS</dc:creator>
      <dc:date>2023-07-18T17:36:23Z</dc:date>
    </item>
    <item>
      <title>Re: Issue while usin 'JQ' Transformer</title>
      <link>https://live.paloaltonetworks.com/t5/cortex-xsoar-discussions/issue-while-usin-jq-transformer/m-p/549857#M2342</link>
      <description>&lt;P&gt;Not with that jq transformer, that error seems like it wants the JSON as a string instead of a dictionary object. DT seems to be able to handle the JSON object without using stringify though.&lt;/P&gt;</description>
      <pubDate>Tue, 18 Jul 2023 17:45:31 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/cortex-xsoar-discussions/issue-while-usin-jq-transformer/m-p/549857#M2342</guid>
      <dc:creator>amontminy</dc:creator>
      <dc:date>2023-07-18T17:45:31Z</dc:date>
    </item>
  </channel>
</rss>

