我看过很多帖子,建议采用扁平结构而不是嵌套项目。我的问题是我应该如何解决这个问题?
{
"GroceryItems" : {
"Meat&Seafood" : {
"1234" : {
"category" : "C",
"grams" : false,
"imageURL" : "https://firebasestorage.googleapis.com/v0/b/lesn-1dcc8.appspot.com/o/pork-loin-steaks-23_3.jpg?alt=media&token=06e4fc13-b997-498b-8649-e2d6ee3967f0",
"inStock" : false,
"itemID" : 1234,
"name" : "Pork Loin",
"price" : "$4/piece",
"productDesc" : "Freshly cut Pork Loin, thin and juicy, taste great when fire grilled."
},
"fdsasda" : {
//same stuff
},
"kfdsopwj1" : {
//same stuff
},
"ofejsadi01" : {
//same stuff
},
我看过其他示例,但不理解,尝试更改时失败。