db.getCollection('users').update(
{"token.token":"21jpjg7pqdtigsdektmndqkobthdcktg"},
{$push:{accounts:"test"}}
)
i run the command above in order to create an array field and the first element inside will be test but i get the error
The field 'accounts' must be an array but is of type NULL in document
i am really confused if i have to create a schema beforehand whats the point of using mongodb over some sql database
i am using in Memory engine