I Have an array named 'treeArray':
Array[78]
0
*function:Object
*menu :
id:1
id_parent:1
name:"Settings"
1
*function:Object
*menu:
id:1
id_parent:1
name:"Settings"
2
*function:Object
*menu:
id:1
id_parent:2
name:"game"
I would like to get two arrays : The first one would contain Objects which follows :
menu.id=menu.id_parent
and the second one where
menu.id!=menu.id_parent
How can i achieve this with lodash ? Thank you