function check(parent) {
for (let price in parent) {
if (parent[price].price == '0') {
return true;
}
}
return false;
}
var parent = {
child : {
a : "1",
b : "1"
},
child2 : {
a : "0",
b : "0"
},
const includes = (a, b) => Object.entries(b).every(([ k, v ]) => Object.is(v, a[k]));
const check = (a, b) => Object.values(a).some(n => includes(n, b));
const result = check(parent, { a: '1', b: '1' });