0

I am fairly new to MongoDB, I have a collection that has a field which contains an array, if I may call it that. I want to check if this field has content in it? Check the example below:

Eg. "field" : [ 2, 3 ]

I want to return records that have an "field" like this:

"field" : [ 26.29476, -32.71036 ],

  • Hi and welcome to Stack Overflow! You haven't really provided enough detail for anyone to help you yet. Please post the minimum amount of your code that reproduces the problem you're having. Often, the process of narrowing this down points out the solution and you don't even need an answer ;) – Rich Churcher Oct 14 '15 at 21:35
  • @RichChurcher on the attached code, I want to check if the "long_lat" field is empty: "_id" : ObjectId("561ec1542ec642f000c6dbdd"), "gis_long" : "26.29476", "longitude" : "26.29476", "long_lat" : [ 26.29476, -32.71036 ] – Ditjhaba Selemela Oct 21 '15 at 09:38

0 Answers0