我使用Firebase For My Store應用程序。我想通過爲用戶提供產品名稱來查找產品的詳細信息。我的JSON格式如下:如何通過發送產品名稱找到特定產品ID?
{
product :
electronic =
a = {
pname = "iphone 5"
pprice = "20000"
pdescription = "Details....." }
b = {
pname = "iphone 6"
pprice = "30000"
pdescription = "Details....." }
}
cloths =
a = pname = "shirt"
pprice = "200"
pdescription = "Details....." }
b = {
pname = "pents"
pprice = "300"
pdescription = "Details....." }
}
現在,假設我有名字iphone 5
,那我怎麼才能找到該產品的其他細節?