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'

    XMLWordPrintable

    Details

    • Type: Question
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Done
    • Affects Version/s: 4.0.4
    • Fix Version/s: None
    • Component/s: JavaScript
    • Labels:
      None

      Description

      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
       

        Attachments

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: