Mongodb: check that all the fields of the elements of an array of objects respect a condition
I have a database of a the employees of a company that looks like this: { _id: 7698, name: 'Blake', job: 'manager', manager: 7839, hired: ISODate("1981-05-01T00:00:00.000Z"), salary: 2850, department: {name: 'Sales', location: 'Chicago'}, missions: [ {company: 'Mac Donald', location: 'Chicago'},…