您好我有几行看起来像这样:
{
name:"row1",
industry_name:["ind1", "ind2"],
... (other fields)
},
{
name:"row2",
industry_name:["ind1", "ind3"]
... (other fields)
}
我想选择所有行,只返回行业名称和行业名称列表,所以这就是我所拥有的:
db.Companies.find({"name":{$exists:true}}, {_id:0, name:1, industry_name:1})
但是这会回来:
{ "name" : "row1" }
{ "name" : "row2" }
不返回任何行业名称。我怎样才能获得行业清单?
谢谢