I need to add a value to mongo db inner object with array element without looking at other value. Can some one advice to do this.
Eg: take order collection as,
{_id:'ssdeiieirei33',userId: 213828, enrolLment:{"ADMIN":{"TERM1":["COURSE1","COURSE3"]},"STUD":{"TERM2":["COURSE1","COURSE2"]}}}
Here I need to add new enrollment(COURSE3) (STUD:{"TERM2":["COURSE3"]}) to enrolLment column with out reading it . this should be the result;
{_id:'ssdeiieirei33',userId: 213828, enrolLment:{"ADMIN":{"TERM1":["COURSE1","COURSE3"]},"STUD":{"TERM2":["COURSE1","COURSE2","COURSE3"]}}}
Is it possible?