大家好我使用的JavaScript我有一組排列的,我需要組由對象如何通過數組值動態地在javascript組
代碼
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}]
我試圖做組由BuildingID加一,二,三 注意:一二三也不是一成不變的
的例外輸出
var data = [{BuildingID: "5", FloorId: "65", one: 24, two: 30,three: 24},
{BuildingID: "6", FloorId: "65", one: 24, two: 30,three: 24} ]
預期結果json? –
一,二,三會發生什麼? –
預期結果json數組@JinsPeter – jose