title: Return True if Array Contains a Specific String - JSONata
body: <p>Is there a way in JSONata to have a function return TRUE if it finds a specific string within a provided array? For example I have an array of colors:</p>
  <p>const myArray =  [red,blue,green,pink]</p>
  <p>I am trying to figure out an expression that would search that array for &quot;blue&quot; and return true if it finds the value.</p>
  <p>On the JSONata documentation, I found a function called $boolean(arg)that I think I would need to use but I'm not sure how to implement it. The <a href="https://docs.jsonata.org/boolean-functions" rel="nofollow noreferrer">documentation</a> shows an argument type option as &quot;array: contains a member that casts to true&quot;, but I can't really tell how to implement it.</p>
  <p>Would it be as simple as $boolean(myArray, &quot;blue&quot;)?</p>