title: Query stored values that contain specific string
body: <p>I have a small realtime firebase database that's set up like this:</p>
  <pre><code>database
  -messages
  --XXXXXXXXXXXX
  ---id : &quot;XXX-XXX&quot;
  ---content : &quot;Hello world!&quot;
  </code></pre>
  <p>It's a very simple message system, the id field is basically a combination of users id from my mysql database. I'm trying to return all messages that match one of the ids, either sender or receiver. But I can't do it, seems like firebase only support exacts querys. Could you give me some guidanse?
  Here's the code I'm working with</p>
  <pre><code>firebase.database().ref(&quot;messages&quot;).orderByChild(&quot;id&quot;).equalTo(userId).on(&quot;value&quot;, function(snapshot)
  </code></pre>
  <p>I'm looking for something like &quot;.contains(userId)&quot;</p>