Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-39599

i am getting Error : MongoError: No array filter found for identifier 'i' in path 'mainCourse.$[i].subCourse.$[j].ppt'

    • Type: Icon: Question Question
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: 4.0.4
    • Component/s: JavaScript
    • None

      var pId=random('Aa0', 6);
      db.collection('test').updateOne({ F_id : req.params.F_id },{ $push : { "mainCourse.$[i].subCourse.$[j].ppt" :

      { pageid : pId , pagelink : link+'/ppt/'+fileName }

      } } ,{ arrayFilters : [

      { 'i.id' : req.params.MC_id }

      , { "j.id" : req.params.SC_id } ]}, (e,r)=>{
      if(e)

      { return res.send(\{Error :'Y' , msg :'Here Database Error '+e}

      );
      }
      return res.send({Error :'N' , msg :'PPT Added Successfully'});
      });
       
      i need to push data in ppt  see in ScreenShot
       
      i am getting Error like this :
       
      MongoError: No array filter found for identifier 'i' in path 'mainCourse.$[i].subCourse.$[j].ppt'
       
      or Any other way to push data in ppt please give suggestion
       

            Assignee:
            kelsey.schubert@mongodb.com Kelsey Schubert
            Reporter:
            m_digant Malaviya Digant
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: