我的firebase数据看起来像这样......
在JSON下面......
我一直在尝试使用我在他们的文档中找到的内容来查询数据库,以便最终得到所有术语及其键。 如何在vocab下查询每个节点的术语属性和关键字?我正在使用它来填充自动提示。此外,词汇节点下的0和1是键......当我将数据作为JSON文件导入时,它们以这种方式出现。然而,任何新的词汇都带有独特的长键值。
我已经尝试了.on()和.equalTo()......但我没有任何运气。它总是似乎抓住数据库的整个词汇节点中的所有内容,并且每次都按照7整秒的顺序进行操作。这是我试图将这些术语放入数组中的一个例子...
{
"date" : "2016-07-26T14:50:10.906Z",
"defs" : [ {
"AddedBy" : "",
"date" : "2016-07-26T14:50:10.906Z",
"def" : "it's your need to fulfill or to obtain your full potential, and have meaningful goals.",
"image" : ""
}, {
"AddedBy" : "",
"date" : "2016-07-26T14:50:10.906Z",
"def" : "the very last stage in priority in order to be happy.",
"image" : ""
}, {
"AddedBy" : "",
"date" : "2016-07-26T14:50:10.906Z",
"def" : "the need to be able to set goals and reach them and be able to accept one's self.",
"image" : ""
} ],
"examples" : [ {
"AddedBy" : "",
"addDate" : "2016-07-26T14:50:10.906Z",
"approved" : true,
"checkDate" : "2016-07-26T14:50:10.906Z",
"example" : "a self-actualizing person is a person who accepts themselves, sets realistic and meaningful goals and accepts change.",
"feedback" : {
"comment" : "",
"grammarTrouble" : false,
"incorrect" : false,
"moreSpecific" : false,
"noContext" : false
},
"nonExample" : false,
"seenRecently" : [ {
"sawOn" : "",
"user" : ""
} ]
}, {
"AddedBy" : "",
"addDate" : "2016-07-26T14:50:10.906Z",
"approved" : true,
"checkDate" : "2016-07-26T14:50:10.906Z",
"example" : "who is not self-actualizing is a person who dislikes themselves, has no goals in life, and refuses to accept change.",
"feedback" : {
"comment" : "",
"grammarTrouble" : false,
"incorrect" : false,
"moreSpecific" : false,
"noContext" : false
},
"nonExample" : false,
"seenRecently" : [ {
"sawOn" : "",
"user" : ""
} ]
}, {
"AddedBy" : "",
"addDate" : "2016-07-26T14:50:10.906Z",
"approved" : true,
"checkDate" : "2016-07-26T14:50:10.906Z",
"example" : "Someone who achieves to their best personal ability and faces every situation head on.",
"feedback" : {
"comment" : "",
"grammarTrouble" : false,
"incorrect" : false,
"moreSpecific" : false,
"noContext" : false
},
"nonExample" : false,
"seenRecently" : [ {
"sawOn" : "",
"user" : ""
} ]
} ],
"term" : "Self Actualization",
"unit" : 0
},
这甚至没有得到钥匙(我需要),它仍然需要大约7秒才能完成。我已经看过人们在一行中做这样的事情的视频,而且很快......不是我的运气。任何帮助将非常感激。
这里要求的是一个数据库节点的JSON样本......有400多个像这样...相关属性是term ...一直在底部。我需要一系列术语和firebase数据库密钥。如何通过查询获取它们?
{{1}}