title: mongodb mongoose query for a point where coordinates=[longitude,latitude]
body: <p>I have successfully created a schema which stores longitude,latitude of type point. I have indexed it using 2dsphere . I'm using mongodb and mongoose.
  <p>Here is the code snippet of my schema</P>
          <pre>var locationSchema = new mongoose.Schema({
          loc :  { type: {type:String}, coordinates: [Number]},
          locationName: String,</p>
  
  <pre><code>})
  </code></pre>
  
  <p>locationSchema.index({loc: '2dsphere'});</pre></p>
  
  <p><P>I can successfully insert location data in the table.</P>
  <p>I would like to do something similar to "select loc from DB where coordinates = [longitude,latitude]" using mongoose and in mongodb . </p>Using mongodb ,I tried using db.collections.find({loc:{type:"point",coordinates:[longitude,latitude]}) and several other syntactic variations of the same query, it didn't work. </p>
  
  <p>Could someone please point in the right direction?</p>