[英]Firebase fetching data based on a particular key value
I am using firebase real time database.我正在使用 firebase 实时数据库。 My data is mostly an array of records.
我的数据主要是一组记录。 For example:
例如:
opty = [ {"id":1,"name":"a"}, {"id":2, "name": "b"}]
I can access the entire dataset using:我可以使用以下方法访问整个数据集:
https://<my project id>.firebaseio.com/opty.json
How do I fetch the record with an id
of 2 here?如何在此处获取
id
为 2 的记录? I've tried to do the following:我尝试执行以下操作:
https://<my project id>.firebaseio.com/opty.json?OptyId=2
but that doesn't work.但这不起作用。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.