Return Value: This method returns the new duplicate free array. 1. Lets say we have collection of objects: var a = [ {id: 10}, {id: 20}, {id: 30}, {id: 30}, {id: 20} ]; And if we need to get array with duplicate values of ids from array… Lodash method “_.filter” iterates over the top level only. I used some code mentioned in a similar question : Group array of object nesting some of the keys with specific names The tree view list can also be shown as a drop-down with checkboxes to enable selection. An Easy Way to Build a Tree in JavaScript Using Object References , Building a tree structure in JavaScript can be easy if you think in terms While it's not completely necessary, let's start by creating a mapping of  Tree View Step 1) Add HTML: Example