我有一个结构的数据库,大致类似于
// An index to track Ada's memberships
{
"users": {
"alovelace": {
"name": "Ada Lovelace",
// Index Ada's groups in her profile
"groups": {
// the value here doesn't matter, just that the key exists
"techpioneers": true,
"womentechmakers": true
}
},
...
},
"groups": {
"techpioneers": {
"name": "Historical Tech Pioneers",
"members": {
"alovelace": true,
"ghopper": true,
"eclarke": true
}
},
...
}
}
但我无法弄清楚如何选择属于同一组人员的用户
答案 0 :(得分:0)
您必须定义一个额外的<li>
或group_combinations
索引,您可以将每个用户存储在他们的组合下:
all_groups