假设我有 s mongo 数据库:
[
{
name: tom,
tags: ["a","b"]
}
{
name: lee,
tags: ["b","c", "d"]
}
{
name: jack,
tags: ["c","d"]
}
]
我想找到标签包含的对象b
,如上面tom
和lee
那么我可以使用什么查询语句?
假设我有 s mongo 数据库:
[
{
name: tom,
tags: ["a","b"]
}
{
name: lee,
tags: ["b","c", "d"]
}
{
name: jack,
tags: ["c","d"]
}
]
我想找到标签包含的对象b
,如上面tom
和lee
那么我可以使用什么查询语句?