Mongodb query based on item at specific position in array

后端 未结 1 1877
闹比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)
提交回复
热议问题