title: Android Firebase filter one database based on children of other database
body: <p>I have 2 databases. One is blogposts and other is following. Now I want to retrieve only those data from blogposts whose users are followed by me (like what we do in any social media app). My blogposts' posts are of the format:</p>
  
  <p><a href="https://i.stack.imgur.com/M4RMj.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/M4RMj.png" alt="enter image description here"></a></p>
  
  <p>and the following database of the format:</p>
  
  <p><a href="https://i.stack.imgur.com/RjwY3.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/RjwY3.png" alt="enter image description here"></a></p>
  
  <p>As we can see, I want to get the values from following (values are userids)  and compare them with the userId in each post in blogpost. If I find out that they are equal, I get the query and use that in firebaserecycleradapter.
  I know how to use firebaserecycleradapter. Please tell me how to get the query.</p>