firebase - Retrieving values from Firebase database?
问题描述
Here is my structure of realtime database in firebase
{
"student1" : {
"name" : "somename",
"skillset" : [
"cpp",
"c",
"java"
],
other properties
},
"student2" : {
"name" : "somename",
"skillset" : [
"javascript",
"c",
"python"
],
other properties
},
"student3" : {
"name" : "somename",
"skillset" : [
"cpp",
"java"
],
other properties
},
"student4" : {
"name" : "somename",
"skillset" : [
"java",
"kotlin"
],
other properties
} }
I want to retrieve all the students having some specific set of all skills
e.g. skills = ["cpp","java"]
then answer should be ["student1","student3"]
解决方案
That is not possible under this structure, as firebase only support filtering by one child. In your case, you would need to get all the data and filter by code
推荐阅读
- widget - Outlook 应用程序级别的修改,在小部件和 Outlook on-click 之间建立连接
- c# - 由 for-each 循环 asp.net 填充的新匿名类型
- regex - 用于 css 和 js 的 Nginx 位置正则表达式
- django - 如何将 Django ORM 与云 NDB 一起使用?
- java - 弹性搜索 jar 下载不同版本
- java - 转换整个 dom4j 元素的命名空间
- vb.net - 如何获取选定目录的完整路径,然后在代码中使用该目录
- java - 如何在java中排名胜率
- snowflake-cloud-data-platform - 对用户进行操作的权限不足
- flutter - 找不到Android Studio gradle异常flutter sdk