title: Finding a specific value in a specific position of an array with MongoDB
body: <p>I am fairly new to MongoDB and I am trying to figure out how I can query a collection for a document that contains a <em>specific value</em> in a <em>specific array position</em>. I have a general idea but I am getting syntax errors when I try to use <code>$position</code> so I know I'm off track here despite my best effort with the mongo docs.</p>
  
  <p>As an example document for what I am trying to do, I'll use a recipes database collection:</p>
  
  <pre><code>{
    "_id": ObjectId("1234"),
    "recipeName": "Super tasty cilantro lime chicken",
    "ingredients": ["chicken breast", "cilantro", "lime"]
  },
  {
    "_id": ObjectId("4321"),
    "recipeName": "Radical Cilantro Dip",
    "ingredients": ["cilantro", "lime", "sour cream"]
  }
  </code></pre>
  
  <p>What is the best method for finding only the document(s) that contains cilantro in the 2nd position of the ingredients array instead of all documents containing cilantro in any position?</p>