0

Hi i have an Object like this in my database

{
  "_id" : ObjectId("53a88d81a00456db9687fd1b"),
  "id" : NumberLong(381341),
  "version" : "14",
  "changeset" : "8658593",
  "uid" : "12919",
  "user" : "Cerritus",
  "timestamp" : "2011-07-07T15:47:09Z",
  "poly" : {
    "type" : "LineString",
    "coordinates" : [[8.5904504, 49.8634605], [8.5904517, 49.8634134], [8.5905602, 49.8624448], [8.5906698, 49.8616734], [8.5908094, 49.86097], [8.5908963, 49.8603052], [8.5909131, 49.8602373], [8.5909636, 49.8598595], [8.5910442, 49.859171]]
  },
  "highway" : "unclassified",
  "name" : "Flughafenstraße"
}

why does this query return nothing?

{'poly.coordinates.length': {$eq:7}}

1 Answer 1

1

the correct query is

{"poly.coordinates": { $size: 7 }}
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.