标签: mongodb
StackOverflow上有很多关于如何查询包含特定字符串的字段的答案。
但是,您如何编写查询结果,其中字段匹配数组中的任何字符串?
例如,查询数组为["win","success","goal"]
["win","success","goal"]
它将匹配以下结果:
{someProperty: "this was a win"},{someProperty: "our goal is"},{someProperty: "successfully completed"}