How to filter the response from mongoDB, so nested arrays will include only items that meet a condition?
My documents look like this { "_id": { "$oid": "62825f71005ce00c5f0235c1" }, "user": "jon", "roles": { "User": 2001, }, "STOCK ": [ { "sku": "BLACK-M", "productname": "BLACK", "sendout": 0, "recived": 1, "totalinstock": 40, "location": "B32", "_id": { "$oid": "62826016005ce00c5f0235c8" } },…