0

My database structure looks like this ,

-posts
    -postId1
        -tags
            1:A
            2:B
            3:D
        -text:Hello

    -postId2
        -tags
            1:B
            2:D
        -text:How are you?

    -postId3
        -tags   
            1:A
            2:C
        -text:Hello World

Now, I want to retrieve the text of those postIds which contains tags B or D, Which one will be the best approach to achieve this ?

Darshan Soni
  • 1,779
  • 1
  • 12
  • 24
  • You might be interested in this post[http://stackoverflow.com/questions/27207059/](http://stackoverflow.com/questions/27207059/) – koceeng Feb 23 '17 at 04:44
  • This is a categorization problem. See my answer here for one way to solve that: http://stackoverflow.com/questions/40656589/firebase-query-if-child-of-child-contains-a-value – Frank van Puffelen Feb 23 '17 at 14:31

0 Answers0