title: How to get the sub document within a nested array in MongoDB?
body: <pre><code>{
      'userid' : '5e6f2f38e8cfcfaf34ee76a6',
      'c':[
            {'cid':123 ,'flist':['5e6de87050fba047c4c666e1','5e65e475aa1d2a77e1e7d9b3','5e75e5a02dfcda6e321be941']} ,
            {'cid':321 ,'flist':['5e92533b0f93cb0f6d813631','5e946afbfd003483a47d412b','5e6de87050fba047c4c666e1']} , 
            {'cid':431 ,'flist':['5e65e475aa1d2a77e1e7d9b3','5e946afbfd003483a47d412b','5e75e5a02dfcda6e321be941']} 
          ]
  }
  
  userid ='5e6f2f38e8cfcfaf34ee76a6'
  fid = '5e6de87050fba047c4c666e1'
  
  db.find({'userid':userid ,'c.flist':{'$eq':fid}} , {'c.$.cid':1} )
  </code></pre>
  
  <p>i am trying to get all <code>cid</code> that the <code>flist</code> contain <code>fid</code> </p>
  
  <p>i tryed this method but i got only first match without  <code>{'c.$.cid':1}</code> i got the whole list </p>