请找到以下数据: -
{
"_id" : ObjectId("5a15262a0a2680e91343be0a"),
"name" : "abhi",
"mobile" : 8888888888.0,
"addrs" : "['street'=>'knt','city'=>'bangalore']"
}
答案 0 :(得分:2)
我会将字符串的'addrs'字段更改为:
{
"_id" : ObjectId("5a15262a0a2680e91343be0a"),
"name" : "abhi",
"mobile" : 8888888888.0,
"addrs" : {
"street" : "knt",
"city" : "bangalore"
}
}
并搜索:
{"addrs.city":"bangalore"}