const paths = [
{
path: 'RS',
hasChild :true
},
{
path: 'MO',
hasChild: true
},
{
path: 'EL',
hasChild: true
},
{
path: 'CL',
hasChild: false
},
{
path: 'EL1',
hasChild: true
},
{
path: 'CL1',
hasChild: false
},
{
path: 'RS2',
hasChild :true
},
{
path: 'MO2',
hasChild: true
},
{
path: 'EL2',
hasChild: true
},
{
path: 'CL2',
hasChild: false
},
{
path: 'CL3',
hasChild: false
},
];
Can underscore.js be used to create a complete path from the 'paths' object?
For example:
RS\MO\EL\CL
RS\MO\EL1\CL1
RS2\MO2\EL2\CL2
RS2\MO2\CL3\CL3
In any of the above levels, children can appear more than once. Can underscore.js perform deep watching of nested arrays of objects?
I apologize for the poor formatting of the nested array of objects above.