Database

[{"label":"kpis.avgLatency","program":"ping-test","multiple":false,"conditions":[{"operator":"$gt","value":NumberInt(-107)},{"operator":"$lt","value":NumberInt(0)}]},{"label":"kpis.avgLatency","program":"ping-test","multiple":false,"conditions":[{"operator":"$gt","value":NumberInt(107)},{"operator":"$lt","value":NumberInt(0)}]}]

Query

db.collection.aggregate([{$addFields:{validation:{label:7}}},{$project:{validation2:{$map:{input:"$conditions",as:"val",in:{$switch:{branches:[{case:{$eq:["$val.operator","$gt"]},then:{$cond:{if:{$gt:["$validation.label","$$val.value"]},then:true,else:false}}},{case:{$eq:["$val.operator","$lt"]},then:{$cond:{if:{$lt:["$validation.label","$$val.value"]},then:true,else:false}}},]}}}}}}])

Result