1

I have structure like this:

root
{
    auto_generated_key //push() 
   {
        user_id1 : true
        user_id2 : true
        mess
        {
            ...
        }
   }
}

how can i create query to find this node : "auto_generated_key", by two fields: "user_id1" and "user_id2". Here is no two similar combinations of "user_id1" and "user_id2" under "auto_generated_key" node.

When i try do it i have problem: i can`t to point that i have "auto_generated_key" and move deeply nested by my structure, because firebase creates new node under "root" node

Thank! Sorry, if my english is hard to understanding...

Frank van Puffelen
  • 565,676
  • 79
  • 828
  • 807
Valera Kvip
  • 334
  • 5
  • 14
  • If you're looking to query on multiple properties: that is not currently possible with Firebase queries. See http://stackoverflow.com/questions/26700924/query-based-on-multiple-where-clauses-in-firebase – Frank van Puffelen Sep 10 '16 at 15:41
  • thanks for answer. I solved it by creating a special key common for both. But i still don't understand how could i use queries for searching, because if use it i get always jast a "root" node... – Valera Kvip Sep 10 '16 at 18:02
  • If you're having problems getting a query working, post a question with the JSON structure that you're querying (as text, no screenshot), the query that you're using and the code that listens for the query result. This is a so-called [minimal, complete verifiable example that we can use to reproduce the problem](http://stackoverflow.com/help/mcve). – Frank van Puffelen Sep 10 '16 at 18:16

0 Answers0