<?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: How to use nested array fields in a WHERE clause? in Workato Pros Discussion Board</title>
    <link>https://systematic.workato.com/t5/workato-pros-discussion-board/how-to-use-nested-array-fields-in-a-where-clause/m-p/12198#M4681</link>
    <description>&lt;P&gt;Thanks Gary.&amp;nbsp; After I posted, one of the suggested related posts (with a reply by yourself) comes up -&amp;nbsp;&lt;A href="https://systematic.workato.com/t5/workato-pros-discussion-board/can-we-filter-a-complex-structure/td-p/5777" target="_blank"&gt;https://systematic.workato.com/t5/workato-pros-discussion-board/can-we-filter-a-complex-structure/td-p/5777&lt;/A&gt;&amp;nbsp;... in which you suggest code, so I've just started down that route.&amp;nbsp; Feels like a pain though for something so simple&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":sad_but_relieved_face:"&gt;😥&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 13 May 2026 16:20:55 GMT</pubDate>
    <dc:creator>RussellJ</dc:creator>
    <dc:date>2026-05-13T16:20:55Z</dc:date>
    <item>
      <title>How to use nested array fields in a WHERE clause?</title>
      <link>https://systematic.workato.com/t5/workato-pros-discussion-board/how-to-use-nested-array-fields-in-a-where-clause/m-p/12196#M4679</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;I’m making an API call that returns an array of invoices. Nested inside each invoice is an array of discounts.&amp;nbsp; Here’s a screengrab of the (cut down) Response Body for the step so you can visualise the structure…&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="JSON List.jpg" style="width: 462px;"&gt;&lt;img src="https://systematic.workato.com/t5/image/serverpage/image-id/2684i39320139C09FB48F/image-size/large/is-moderation-mode/true?v=v2&amp;amp;px=999" role="button" title="JSON List.jpg" alt="JSON List.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;It’s a snap (as US folks would say) to return the minimum created_at date from the invoices array…&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Pluck.jpg" style="width: 387px;"&gt;&lt;img src="https://systematic.workato.com/t5/image/serverpage/image-id/2685iB28FA16786927B68/image-size/large/is-moderation-mode/true?v=v2&amp;amp;px=999" role="button" title="Pluck.jpg" alt="Pluck.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;… and this works as expected. It’s just that I want to return the minimum created_at date value from invoices which match a specific discount code value.&lt;/P&gt;&lt;P&gt;Feels like I need to use “where” but I can’t figure out how to refer to nested array fields in the where clause.&amp;nbsp; I'm after something like...&lt;/P&gt;&lt;P&gt;where("invoices.discounts.code" = myvalue)&lt;/P&gt;&lt;P&gt;I know how to use nested array values for "pluck", but can't see how the syntax works with "where".&lt;/P&gt;&lt;P&gt;What am I missing...?&lt;/P&gt;&lt;P&gt;Thanks in advance&lt;/P&gt;&lt;P&gt;Russell&lt;/P&gt;</description>
      <pubDate>Wed, 13 May 2026 12:47:08 GMT</pubDate>
      <guid>https://systematic.workato.com/t5/workato-pros-discussion-board/how-to-use-nested-array-fields-in-a-where-clause/m-p/12196#M4679</guid>
      <dc:creator>RussellJ</dc:creator>
      <dc:date>2026-05-13T12:47:08Z</dc:date>
    </item>
    <item>
      <title>Re: How to use nested array fields in a WHERE clause?</title>
      <link>https://systematic.workato.com/t5/workato-pros-discussion-board/how-to-use-nested-array-fields-in-a-where-clause/m-p/12197#M4680</link>
      <description>&lt;P&gt;Unfortunately this isn't possible using where. You can either use a bunch of loops, or you can dump it into a Ruby action and solve it quickly with .map or .select.&amp;nbsp;I tried a few science projects to do it inline, but nothing was as efficient or convenient as a simple Ruby action.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 13 May 2026 16:16:05 GMT</pubDate>
      <guid>https://systematic.workato.com/t5/workato-pros-discussion-board/how-to-use-nested-array-fields-in-a-where-clause/m-p/12197#M4680</guid>
      <dc:creator>gary1</dc:creator>
      <dc:date>2026-05-13T16:16:05Z</dc:date>
    </item>
    <item>
      <title>Re: How to use nested array fields in a WHERE clause?</title>
      <link>https://systematic.workato.com/t5/workato-pros-discussion-board/how-to-use-nested-array-fields-in-a-where-clause/m-p/12198#M4681</link>
      <description>&lt;P&gt;Thanks Gary.&amp;nbsp; After I posted, one of the suggested related posts (with a reply by yourself) comes up -&amp;nbsp;&lt;A href="https://systematic.workato.com/t5/workato-pros-discussion-board/can-we-filter-a-complex-structure/td-p/5777" target="_blank"&gt;https://systematic.workato.com/t5/workato-pros-discussion-board/can-we-filter-a-complex-structure/td-p/5777&lt;/A&gt;&amp;nbsp;... in which you suggest code, so I've just started down that route.&amp;nbsp; Feels like a pain though for something so simple&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":sad_but_relieved_face:"&gt;😥&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 13 May 2026 16:20:55 GMT</pubDate>
      <guid>https://systematic.workato.com/t5/workato-pros-discussion-board/how-to-use-nested-array-fields-in-a-where-clause/m-p/12198#M4681</guid>
      <dc:creator>RussellJ</dc:creator>
      <dc:date>2026-05-13T16:20:55Z</dc:date>
    </item>
    <item>
      <title>Re: How to use nested array fields in a WHERE clause?</title>
      <link>https://systematic.workato.com/t5/workato-pros-discussion-board/how-to-use-nested-array-fields-in-a-where-clause/m-p/12199#M4682</link>
      <description>&lt;P&gt;That post is 3 years old and I've come a long way since then! My example uses a .each loop. I used this a lot because it was easy to follow mentally, but using .select/map are really the most efficient ways to do it. Once I committed to learning how to use them properly, there was no turning back. You could also dial in ChatGPT or Claude to write the code snippets for you. I started doing this once I understood them well enough on my own.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 13 May 2026 16:40:21 GMT</pubDate>
      <guid>https://systematic.workato.com/t5/workato-pros-discussion-board/how-to-use-nested-array-fields-in-a-where-clause/m-p/12199#M4682</guid>
      <dc:creator>gary1</dc:creator>
      <dc:date>2026-05-13T16:40:21Z</dc:date>
    </item>
  </channel>
</rss>

