title: How to filter complex object in Firebase?
body: <p>Could you please help to filter below JSON using <code>eventId</code>?</p>
  
  <pre><code>{
    "-Kb2dYPV0yUXpD_1moc9": {
      "eventId": 1,
      "message": "sdfsdfsf",
      "sentOn": 1485004202943
    },
    "-Kb2etFm1xHd8sSsESeK": {
      "eventId": 1,
      "message": "shdfhsf",
      "sentOn": 1485004553847
    },
    "-Kb2etKON8nWVKS2R0sj": {
      "eventId": 2,
      "message": "shdfhsf",
      "sentOn": 1485004553853
    }
  }
  </code></pre>
  
  <p>I'm using below URL,</p>
  
  <p><code>https://xxxxxxxx.firebaseio.com/chats.json?orderBy="eventId"&amp;equalTo=1</code></p>
  
  <p>but getting <code>constraint index field must be a json primitive</code> error.</p>
  
  <p>I want to retrieve chat objects with respect to particular event ID. I referred to the REST API, there, it was explained with simple JSON.</p>
  
  <p>Please help me.</p>