Want to change value with Ember.js Array forEach? You can use the Ember.set(yourObject, propertyName, value); and Ember.get(yourObject, propertyName); to safely set and get properties.
1 2 3 4 | self.resultList.forEach(function(item, index, enumerable) { Ember.set(item, "id", 11); Ember.get(item, "id"); }); |
If you like this question & answer and want to contribute, then write your question & answer and email to freewebmentor[@]gmail.com. Your question and answer will appear on FreeWebMentor.com and help other developers.