hi all i am using javascript i have a set of array i need to group by the object
code
var data = [{BuildingID: "5", FloorId: "65", one: 12, two: 15,three: 12},
{BuildingID: "5", FloorId: "65", one: 12, two: 15,three: 12},
{BuildingID: "6", FloorId: "65", one: 12, two: 15,three: 12},
{BuildingID: "6", FloorId: "65", one: 12, two: 15,three: 12}]
i am trying to do group by the BuildingID add one,two,three NOTE:one two three is not static
Excepted Output
var data = [{BuildingID: "5", FloorId: "65", one: 24, two: 30,three: 24},
{BuildingID: "6", FloorId: "65", one: 24, two: 30,three: 24} ]