function buildHierarchy(arry) {
var roots = [],
children = {};
for (var i = 0; i < arry.length; i++) {
var item = arry[i],
parent = item.Parent
var target = !parent ? roots : (children[parent] || (children[parent] = []))
target.push({
value: item
});
}
console.log(roots) //roots.length = 2
}