Mongodb query based on item at specific position in array

后端 未结 1 1890
闹比i
闹比i 2020-12-04 03:20

I want to run a query where an item at a specific position in an array needs to be compared.

For example, consider the GeoJSON format for storing location data.

1条回答
  •  北海茫月
    2020-12-04 04:13

    Change your query to the following

       db.users.find({"location.coordinates.0" : -73.04303})
    

    0 讨论(0)
提交回复
热议问题