Javascript Self – Recursive loop | Find within Filter | Loop Within Same Array – Jquery
I have an array with objects: [ { id:1, parent:null, value1:22, value2:33 }, { id:2, parent:1, value1:0, value2:0 }, { id:3, parent:1, value1:40, value2:70 }, { id:4, parent:2, value1:40, value2:70 }, { id:5, parent:null, value1:40, value2:70 } ] I want…