title: How to use `in` expression in Mapbox GL map.setFilter
body: <p>I'm trying to filter a geoJson layer (called "destinations") based on a set of conditions. My "destinations" layer has a property called <code>uniqueID</code> of type string, which most of the time only has one numeric ID, but sometime has more than one. I would like to filter this layer (using <code>map.setFilter</code>) based on an array of IDs. The filter should do something like this: if any of the <code>uniqueID</code> values in the "destination" layer are found in the array of IDs, then filter that feature out.</p>
  
  <p>Here is an snippet of my "destinations" layer:</p>
  
  <pre><code>{ "type": "Feature", "properties": { "destinationLon": -74.20716879, "destinationLat": 40.69097357, "uniqueID": "2029" }, "geometry": { "type": "Point", "coordinates": [ -74.20716879, 40.69097357 ] } },
  { "type": "Feature", "properties": { "destinationLon": -74.20670807, "destinationLat": 40.69137214, "uniqueID": "984,985" }, "geometry": { "type": "Point", "coordinates": [ -74.20670807, 40.69137214 ] } },
  { "type": "Feature", "properties": { "destinationLon": -74.20651489, "destinationLat": 40.71887889, "uniqueID": "1393" }, "geometry": { "type": "Point", "coordinates": [ -74.20651489, 40.71887889 ] } }
  </code></pre>
  
  <p>And here is a sample of the array of IDs I might use: <code>[2000, 984, 1393]</code></p>
  
  <p>I have tried using a filter using the <code>in</code> expression (documentation <a href="https://docs.mapbox.com/mapbox-gl-js/style-spec/expressions/#in" rel="nofollow noreferrer">here</a>) like this:</p>
  
  <pre class="lang-js prettyprint-override"><code>let thisFilter = ["any"].concat(uniqueIDs.map(id =&gt; ["in", id, ["get", "uniqueID"]]));
  map.setFilter("destinations", thisFilter);
  </code></pre>
  
  <p>But I keep on getting this error message:</p>
  
  <pre><code>Error: "layers.destinations.filter[0][2]: string, number, or boolean expected, array found"
  </code></pre>
  
  <p>However, the documentation states the following:</p>
  
  <pre><code>["in",
      keyword: InputType (boolean, string, or number),
      input: InputType (array or string)
  ]: boolean
  </code></pre>
  
  <p>The third argument in the expression is supposed to be an array. Why then am I getting that error?</p>
  
  <p>Any ideas? Thank you!</p>