hi all i am using javascript i am trying to push object values into one array here i attached my code
var data = [{
BuildingID: "56", FloorId: "65", volume: [{
one: 12,
two: 15,
three: 12
}]
}]
var MainInfo=[];
for (i = 0; i < data.length; i++) {
var obj = {}
obj.BuildingID = data[i].BuildingID;
obj.FloorId = data[i].FloorId;
obj.volume = data[i].volume[0];
MainInfo.push(obj);
}
it's working but not fully applicable here i mentioned the excepted output what should i need
Current output
Expected output
Note:in data volume is dynamic help how to do this

