"Products" : {
"DateTime" : {
"category" : "Mobile Phones",
"pid" : "",
"pname" : "",
"price" : "",
}
}
Hello I am developing an android app using firebase. I am able to list all products in my firebase database. However, I would like to show products based on the category (ex: Mobile Phones
, Tablets
etc). How do I do this?
答案 0 :(得分:0)
you can use a compound query like:
Query products = db.collection("Products/DateTime").whereEqualTo("category", YOUR_CATEGORY);
Check more here