У меня есть массив JSON mongodb, и у меня возникают проблемы с поиском категорий, например.
{ name:"hoyts"}
Я пробовал {categories.name:"hoyts"}
и несколько других, но, похоже, ничего не работает.Это мой JSON:
{
"_id": ObjectId("4f67da1538fc5d7347000000"),
"categories": {
"id": 1,
"name": "hoyts",
"product-logo": "http: \/\/www.incard.com.au\/newsite\/template\/images\/movieticket\/4cinemas\/hoytstop.png",
"products"▼: {
"0": {
"barcode": "25001",
"name": "GoldClass",
"Price": "12.00",
"CashBack": "2.00"
},
"1": {
"barcode": "25002",
"name": "Weekday",
"Price": "12.00",
"CashBack": "2.00"
},
"2": {
"barcode": "25003",
"name": "Weekend",
"Price": "24.00",
"CashBack": "4.00"
}
}
},
"store_name": "movies",
"1": {
"id": 2,
"name": "village",
"logo": "village.png",
"products": {
"0": {
"barcode": "26001",
"name": "GoldClass",
"Price": "12.00",
"CashBack": "2.00"
},
"1": {
"barcode": "26002",
"name": "Weekday",
"Price": "12.00",
"CashBack": "2.00"
},
"2": {
"barcode": "26003",
"name": "Weekend",
"Price": "24.00",
"CashBack": "4.00"
}
}
}
}