Typescript; push ObjectId into an arr[ ]

HOW DO I PUSH OBJECTID OF A DOCUMENT TO ANOTHER IN MONGOOSE
HOW DO I PUSH OBJECTID OF A DOCUMENT TO ANOTHER IN MONGOOSE
..... I have a collection for categories and it has an
Array[ ]
Array[ ]
of Brands that only takes in
ObjectId
ObjectId
of brands, i typed the brand as
brand: ObjectId[ ]
brand: ObjectId[ ]
but the push method is not working, nothing is being pushed to the
brand Array[ ]
brand Array[ ]
inside the category.
0 Replies
No replies yetBe the first to reply to this messageJoin
Want results from more Discord servers?
Add your server