I am taking input from user to get place detail by using autocomplete place api
offered by Google.
Now I want to get each document from Firestore which belongs to this place. So to do this what approach should I follow? What should I store in documents so I can easily find it out.
My approach
myShopsCollection
shopDoc1
city:"xyz"
arrayId:[placeId1,PlaceId2,PlaceId3]
shopDoc2
....
Now I get placeId PID
from autocomplete api
my query become like this
db.collection(myShopsCollection').where('arrayId','array-contains',PID)