我有一个对象数组,如下所示
Object {Results:Array[2]}
Results:Array[2]
[0-1]
0:Object
id=1
name: "Rick"
1:Object
id=2
name:'david'
Run Code Online (Sandbox Code Playgroud)
我想为这个Objects数组的每个元素添加一个名为Active的属性.
最终结果应如下.
Object {Results:Array[2]}
Results:Array[2]
[0-1]
0:Object
id=1
name: "Rick"
Active: "false"
1:Object
id=2
name:'david'
Active: "false"
Run Code Online (Sandbox Code Playgroud)
有人可以让我知道如何实现这一目标.