im trying to add element to array in document MongoDB collection with Aggregate (not regular update) match to specific name but i dont find the right syntax
for example:
{"name":"TEST1","department":"T1","skills":["JS","HTML"],"expY":5}
{"name":"TEST2","department":"T2","skills":["Java","CSS"],"expY":3}
i want to add to skills array "CSS" i try with sort, match, group, project, ($add, $push etc) and none of those syntax not working
db.collection.aggregate([
{ $match : { name : "TEST1" } },
HERE I DONT KNOW WHAT IS THE RIGHT SYNTAX TO ADD ELEMENT TO skills array
])