the correct command is db.treasures.find({location: {$near: [0, 0]}, type: "gold"}).limit(5);
you have an extra { infront of "type"...making it invalid json.
the correct command is db.treasures.find({location: {$near: [0, 0]}, type: "gold"}).limit(5);
you have an extra { infront of "type"...making it invalid json.