-
How to push or pull item from an array in Mongoose스터디노트/DB 2022. 12. 6. 09:18
타입이 배열인 컬럼에 데이터 추가하기
- $push : {컬럼 : {$each : 추가할 데이터}}
$push: { '객체 형태의 데이터.$.키값': { $each: 추가할 데이터 }, },
참고자료
'스터디노트 > DB' 카테고리의 다른 글
MongoDB findOne() without _id & MongoDB에서 find와 aggregate 성능 차이 (0) 2023.01.26 Mongodb add key-value pair to object (0) 2022.11.08 MongoDB Query for documents array size is greater than (0) 2022.09.20 필드가 배열인 경우 MongoDB update하기 (0) 2022.07.26 MongoDB 사칙연산 쿼리 (0) 2022.07.04 - $push : {컬럼 : {$each : 추가할 데이터}}