Say I have an object similar to the following:
Cars = {
"car_one": {
data: {
make: "Ford",
model: "Festiva"
},
img: "car_one.jpg"
},
"car_two": {
data: {
make: "Chevy",
model: "Pinto",
color: "Green"
},
img: "car_two.jpg"
}
...and so on...
}
I am hoping to find a way to monitor just the data
property (and all sub-properties) for changes, then be able to setup a function to fire.
I have been looking at Object.watch() but testing seems to show that I would need to have it manually setup to check each property of Cars.{some_car}.data
which (as shown in my example) isn't a constant set. I guess I'm hoping there's a less complex method that I'm just not aware of.