title: How to retrieve data from Firebase real time database with child keys?
body: <p>I'm developing simple chat app with Vue and Firebase. I'm struggling with getting data as I want.</p>
  <p>I will have data structure roughly like this:</p>
  <pre><code>{    
      user:{
             id:{
                 .......
                }
            },
      chats:{
              id:{
                  ......
             },
      members:{
               chatId:{
                       userId:{
                               ......
                              }
                       }
               }
  }
  </code></pre>
  <p>I wonder how to know if there is chat exist between users. I want to know if there is function that gets chat id(between user A and B) with parameters(user A and B ids).</p>
  <p>For instance, when there is chat between user A and B, data would be like this:</p>
  <pre><code>{
      user:{
            A:{...}, B:{...}
           },
      chat:{
            chatBetweenAandB:{...}
           },
      members:{
            chatBetweenAandB:{
                              A:{...}, B:{...}
                             }
           },
  }
  </code></pre>
  <p>In this case, how can I find chatBetweenAandB with parameters A and B?</p>