title: MongoDB: How to fetch value for particular sub-field and its subsequent field in the array?
body: <p>I am new to MongoDB. I am trying to get field values for a particular sku from the array in the document. I tried query ({"items.sku":"abc"},{"items.price":1}) but it is giving prices for both skus. I would appreciate if anybody can tell me how I can get price for only sku:"abc" i.e 3.5?</p>
  
  <pre><code>{  "_id": 123,
       "store": "store1",
       "items": [ { sku: "abc", qty: 4, price: 3.5 },
                { sku: "def", qty: 3, price: 2.5 } ]
  }
  </code></pre>