I am a mongoDB noob and I'm struggling with a query. Let's assume I have the following structure:
{
"id": "1",
"type": 2,
"shops": ["1000","2000","3000"]
},
{
"id": "2",
"type": 2,
"shops": ["1000","4000","5000"]
}
How do I remove every shop which is equal to, e.g 1000, so that the resulting db records would be:
{
"id": "1",
"type": 2,
"shops": ["2000","3000"]
},
{
"id": "2",
"type": 2,
"shops": ["4000","5000"]
}
Thanks so much in advance!