Basically I have an array with organisations = [] that I fill with an SQL query. This makes the array like organisations = [ {id1, name1, type1}, {id2, name2, type2}]
I want to create another array where the key of the array objects is the first element of the objects inside organisations, so they would be id1, id2 etc etc.
I think the output should be like newArray = [id1: {name1, type2}, id2: {name2, type2}]