I have a folowing object structure in my db collection:
{ \"name\" : \"test\", \"code\" : \"test\", \"attributes\" : [ { \"name\
The $elemMatch operator matches documents that contain an array field with at least one element that matches all the specified query criteria.
This query work for me:
db.getCollection('testeur').find({ "attributes": { $exists: true, $ne: [], $elemMatch: { "value": {$exists: false } } } })