0

I am new to Firebase Database, I am making an android app in which the structure of the data is like this :

{
posts={
    -Ks4AoL7F-oKtwd3M8Ao={
        address=Address of mine, 
        title=Title , 
        subcategory=E-waste, category=Garbage, 
        time=21-08-2017 07:54 p.m., 
        mobileNumber=some mobile number, 
        comment=hhdhdehsbsbhs, 
        statusText=Pending, 
        imagePath=https://firebasestorage.googleapis.com/v0/b/path-to-image
    },...
}

So in this structure i want to query the posts on the basis of the mobile number i.e., if the mobile number matches than the current post will be retrieved else skip this post and check for next post and so on...

Community
  • 1
  • 1

2 Answers2

0

you can get all the list of data from post object with the help of simple queries which you can find in documentation part of firebase, where you can check for each object's mobile no, accordingly apply the conditions to keep or discard the object.

for more info please look into the link:-

sample to retrieve the data from firebase

Nikhil Jadhav
  • 1,621
  • 2
  • 12
  • 19
-1

You can refer this post and This

AndiM
  • 2,196
  • 2
  • 21
  • 38