title: Comparing fields in $where clause in mongodb
body: <p>Trying to find out if desc and atr.value for atr.key="DSP" are equal in following mongo table data:</p>
  
  <pre><code>{
  "_id": ObjectId("12345"),
  "desc": "Foo Bar",
  "type": "Normal",
  "atr": 
  [
  {
  "key":"DSP",
  "value":"Goo Bar"
  },
  {
  "key":"UDSP",
  "value":"Foo Bar"
  }
  ],
  "prod": "yes"
  }
  </code></pre>
  
  <p>Running following query but not getting appropriate results:</p>
  
  <pre><code>db.collection.find({$and: [{"atr.key" : { $eq:"DSP"}},{$where: "this.atr.value=this.desc"}]})
  </code></pre>
  
  <p>Getting 0 results instead of 1.</p>