Need help with building a query to include a new field in multiple activity json for given list of _id's

var acti =db.getCollection(‘Demoact_e394e06b819c4459906bd83870895ce0’).find({"_id" :{$in:[“a1bb1a5c-c3ee-4fe1-a9d7-b83b21c92210”,“6d3caab9-31cf-442f-9540-6f1afe37a3b7”]}});
acti.forEach(function(act){
db.aggregate([ { “$addFields”: { “note.customFields”:"$note.customFields.Ant__Status_Dropdown_YN1579778550370" } } ]);
act.note.customFields.Ant__Status_Dropdown_YN1579778550370=“1I0054U9FAKXZ0H26HNLC62QNDCTFAGNL43H”;
db.getCollection(‘Demoact_e394e06b819c4459906bd83870895ce0’).save(act);

});

I am trying to add a new field with some value for above id’s given. Can someone help me with resolving the script

Hi @v1257,

Please take a look at the documentation link below:

If you are getting any error or you cannot see the desired output, please share the output of the above query and sample document structure.

Please let me know, if you have any questions.

Thanks,
Sonali