const testTrue = sample.map((condition) => {
return Object.values(objects).forEach(value => {
return someFunc(condition.abc, value)
})
});
sample is an array, why above code don't make testTrue become [ true, false ] ? I got undefined, is it because of forEach here?
This is working
const testTrue = sample.map((condition) => {
return someFunc(condition.abc, value)
});
forEachcallback is ignored. What were you trying to do there? Can you give an example ofconditionandobjectsand your expected output?samplearray?