Increment count if exist else push in array Mongodb [duplicate] 43 viewsFebruary 2, 2024mongodbmongodb querymongoosenosql 0 addie94166 February 2, 2024 0 Comments I have this data I’m working with [ { id: 1, tags: [ { name: "red", count: 1 }, { name: "black", count: 3 } ] } ] I want to update the count if tag.name exist else push the new tag object in tags array 0 Answers ActiveVotedNewestOldest Register or Login