我想通过REST API从Firebase JSON中“获取”第一层信息,而每个对象都没有任何嵌套数组。如何使用Firebase做到这一点,以避免必须下载整个数据集?
即从下面的JSON,我只想返回:
{ "people":[
{"name":"bob"},
{"name":"dave"}
]}
完整资料
{
"people":[
{
"name":"bob",
"measurements":[
{
"measname":"first test",
"weights":[
{
"device":"scaleA",
"weight":78.0
},
{
"device":"scaleA",
"weight":78.2
}
]
}
]
},
{
"name":"bob",
"measurements":[
{
"measname":"first test",
"weights":[
{
"device":"scaleA",
"weight":78.0
},
{
"device":"scaleA",
"weight":78.2
}
]
}
]
}
]
}
编辑:我不知道您指定此需要在服务器端。根据此问题,似乎不可能:具有Firebase的数据库样式查询
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句