Typescript; push ObjectId into an arr[ ]

HOW DO I PUSH OBJECTID OF A DOCUMENT TO ANOTHER IN MONGOOSE
..... I have a collection for categories and it has an
Array[ ]
of Brands that only takes in
ObjectId
of brands, i typed the brand as
brand: ObjectId[ ]
but the push method is not working, nothing is being pushed to the
brand Array[ ]
inside the category.
Screenshot_2022-10-16_232149.png
Screenshot_2022-10-17_034221.png
Screenshot_2022-10-17_034448.png
Was this page helpful?