Create an object from an array with multiple ids, using the id as a key and knowing how many identical ids each have
function createOrder(organization: TreeOrganization, valueId: number): number {
return organization.values
.map(o => o.parentId)
.reduce((a, c) => {
return a[`${c}`] === undefined