Reputation: 1372
How to observe an object property with numeric key, as:
"employees":[
{"1": 0, "2":"John", "3":"Doe"},
{"1": 1, "2":"Anna", "3":"Smith"},
]
Observing whole object works well with: employees.*
But can not target specific property as: employees["2"]
.
How can specific property be targeted?
Here is Plunk example.
Upvotes: 0
Views: 64
Reputation: 138276
To observe all changes to the 2nd employee in your example, you'd use Deep sub-property changes on array items:
observers: [
'bigup(datatable.employees.#1.*)'
],
Upvotes: 2