title: Retrieving Specific Data from FireBase (Android)
body: <p>I am making a chat app, and I have a Firebase with following Structure. Chat1,Chat2,Chat3... is used for saving data of different Chat groups. Message1,Message2,Message3 are Messages inside 1st group., It can be from any author.  </p>
  
  <p>Chats</p>
  
  <ul>
  <li>Chat1
  <ul>
  <li>Message1
  <ul>
  <li>Author1</li>
  <li>MessageText</li>
  </ul></li>
  <li>Message2
  <ul>
  <li>Author2</li>
  <li>MessageText</li>
  </ul></li>
  <li>Message3
  <ul>
  <li>Author1</li>
  <li>MessageText</li>
  </ul></li>
  </ul></li>
  <li>Chat2
  <ul>
  <li>Message1
  <ul>
  <li>Author3</li>
  <li>MessageText</li>
  </ul></li>
  <li>Message2
  <ul>
  <li>Author4</li>
  <li>MessageText</li>
  </ul></li>
  <li>Message3
  <ul>
  <li>Author1</li>
  <li>MessageText</li>
  </ul></li>
  </ul></li>
  <li>Chat3</li>
  </ul>
  
  <p>I want to retrieve the list of all Messages from "Author 1".  Meaning Message1,Message3 should be retrieved from Chat1 and Message3 also should get retrieved from Chat2. I want to display all messages from 1 author.  </p>
  
  <pre><code>ref = new Firebase(FIREBASE_URL); //Root URL
  
  ref.addValueEventListener(new ValueEventListener() {
  
      @Override
      public void onDataChange(DataSnapshot dataSnapshot) {
           for (DataSnapshot child : dataSnapshot.getChildren()) {
                   for (DataSnapshot childd : child.getChildren()) {
                       //This might work but it retrieves all the data
                      }
                  }
      }
  
      @Override
      public void onCancelled() {
  
      }
  });
  </code></pre>
  
  <p>This Gives me entire data! How do I restrict it to "Author1"? </p>