title: wp rest api filter nested array jmespath
body: <p>I'm trying to filter a wpapi request, using Jmespath o standard built in filter string.</p>
  
  <p>I would like to retrive all "id" in the list with one or more values in the "filters" array. "Filters" is nested under "_item_filter-options". </p>
  
  <p>For ex I would filter all id with "filters"==409 OR 400.</p>
  
  <p>And what about filter all "id" with "locations"==217 OR other value? </p>
  
  <p>Could you help me to find solution?</p>
  
  <pre><code>[
    {
      "id": 2608,
      "date": "2018-08-18T12:53:16",
      "date_gmt": "2018-08-18T10:53:16",
      "ait-locations": [
        217,
        19
      ],
      "ait_item_filters-options": {
        "filters": [
          "419",
          "400",
          "409",
          "418",
          "531",
          "403",
          "408",
          "575"
        ]
      },
  
    },
    {
      "id": 2588,
  .....
  </code></pre>
  
  <p>I add some additional information, It might help to answer me.
  I'am using an ait-club wordpress theme with custom post type "ait-item" and meta fields.</p>
  
  <p>I'm trying to use Wordpress Rest API to GET all ait-item with some properties, like latitude, title, address etc, filtered by _item_filters-options"->"filters".</p>
  
  <p>Using for example <a href="http://mydomain/wp-json/wp/v2/ait-item?location=19" rel="nofollow noreferrer">http://mydomain/wp-json/wp/v2/ait-item?location=19</a> IT WORKS (location is a custom taxonomy). How can I retrive the same result with Jmespath?</p>
  
  <p>How can get ait-item with filters=419 or more values?</p>
  
  <p>Sorry for my little english, thank you.</p>
  
  <p>Edit:
  Using:</p>
  
  <pre><code>https://www.mydomain.it/wp-json/wp/v2/ait-item?_query=[?_item_filters-options.filters[0]=='400']
  </code></pre>
  
  <p>i can retrive all "id" where the firt value of "filters" array is 400. 
  I can't search in entire "filters" array!! Could you help me?</p>
  
  <p>EDIT: I found solution using:</p>
  
  <pre><code>https://www.areepicnic.it/wp-json/wp/v2/ait-item?_query=[?"_ait-item_filters-options".filters[?@=='400']]
  </code></pre>
  
  <p>or</p>
  
  <pre><code>https://www.areepicnic.it/wp-json/wp/v2/ait-item?_query=[?"_ait-item_filters-options".filters[?contains(@,'397')]]
  </code></pre>
  
  <p>now I'm trying to filter with multiple values.</p>