Mongodb works Javascript way. Every mongodb collection is a JSON object containing all kinds of Javascript objects such as boolean, arrays, objects and strings. In this example I am saving two different fields to my categories collection. searchableName – for…
Category: Mongodb
Export and Import Mongodb commands
To restore earlier database mongorestore -d dbname -c users C:/mypath/to/old/dbname To export a collection mongoexport –db envyd –collection categories –out users_remote.json To import a collection mongoimport –db envyd –collection posts –file posts.json To Update Single or Multiple records Update single…
How to get records filtered by a condition of another table field through join in Mongodb
I have two tables, posts and categories. In posts table there is a field categoryId. I want that only those posts are shown category of which is in enabled state, i.e. for which categories.enabled = true.