1
我有以下数据结构查询数据与火力地堡与OrderByChild
{
"advisors" : {
"0ea9bab6-415e-4900-8698-ac03a1ef4518" : {
"description" : "",
"price" : 0,
"title" : ""
},
"cc31c353-ca6a-440d-b188-af2016f72aef" : {
"description" : "",
"price" : 0,
"title" : ""
},
"d8403e9b-fb74-4425-874f-2d125cd07a68" : {
"description" : "I know every corner in the arab countries.",
"price" : "50",
"title" : "Best guide in the middle east"
}
},
"advisors-countries" : {
"0ea9bab6-415e-4900-8698-ac03a1ef4518" : {
"Angola" : "true"
},
"cc31c353-ca6a-440d-b188-af2016f72aef" : {
"Angola" : "true"
}
},
我想作以下查询:给我这有安哥拉在他们的名单的顾问的所有价格。
我尝试了下一个代码来检索只有安哥拉= true的顾问国家的孩子。
var advisors = (ref.orderByChild("Angole").equalTo(true));
$scope.users = $firebaseArray(advisors);
console.log("sync ", $scope.users);
但我一直在顾问对象中得到空对象。
准确的是什么? –
你的第一行代码行有一个错字'var advisors =(ref.orderByChild(“Angola”)。equalTo(true));'' –