title: updating an array in mongodb
body: <p>for the following structure, I am trying to update the first array item under options to be ["milk", 1]:</p>
  
  <pre><code>{    
    options:[["milk", 0],
             ["chocolate", 0],
             ["others", 0]],
    timestamp:"2017-09-26T14:42:49.359Z"
    title:"shopping list"
    username:"a"
  }
  </code></pre>
  
  <p>this is the mongoose snippet I use.</p>
  
  <pre><code>router.put('/',(req,res) =&gt; {
    let {_id, value, option} = req.body;   
    eventModel.findOneAndUpdate(    
      {_id:_id, options: [option, value]},
      { $set: {"options.$": [option, value + 1]}},
        function(err){
        if(err){
            res.status(400).json({ error: err });
        }
        console.log("event updated");
    });    
  });
  </code></pre>
  
  <p>I always get the "event updated" with no errors but the item does not get updated, any help is appreciated. Thank you</p>