Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
Object.keys(resp.nodes).forEach((k) => {
if (resp.nodes[k].attributes !== undefined) {
const maxOpenJobs = resp.nodes[k].attributes['ml.max_open_jobs'];
if (maxOpenJobs !== null && maxOpenJobs > 0) {
count++;
}
}
});
}