samedi 2 février 2019

Ember: Add objects to an Array

I have an array

ABC =  [
0: {class: "x", rank: 12}
1: {class: "y", rank: 13}
2: {class: "z", rank: 10}
]

and I have gender object/property to be added to ABC in a loop

I need the result like

ABC =  [
0: {class: "x", rank: 12, gender: "male"}
1: {class: "y", rank: 13, gender: "female"}
2: {class: "z", rank: 10, gender: "female"}
]




Aucun commentaire:

Enregistrer un commentaire