blocks.map((item) => {
return item.SubCategory.map((subItem) => {
return subItem.modal.map((modal) => {
let Blocks = selectedBlock === item.Category;
let SubBlocks = selectedSubBlock === subItem.id;
if (SubBlocks && Blocks) {
return bm.add(modal.id, {
label: modal.label,
content: modal.content,
});
}
return null;
});
});
});
How Can we Access modal Array Without Nesting it any Possibilities Like Using Lodash Object Methods to Access the Required Key get(val, 'val.val.val') is there any Option to do Like this in Array Methods