在JavaScript值中为数组分配数量递增的数字

我正在尝试构建类似这样的东西以在UI5中修改JSON文件: 我想用增加的数字将字段添加到数组中。字段1,字段2,字段3 ...

for (var j = 0; j < b.length; j++) {
    var number = 1; //number increasing
        a[i].Field + number = c; //not working like this.  
}

这是行不通的。输出应为:

0:
Field1: "Lorem"
Field2: "Ipsum"
Field3: "Pisum"
1:
Field1: "Lorem"
Field2: "Ipsum"
Field3: "Pisum"
评论