I have a structure like the following:
skillet.person = {
name: {
first: '',
last: ''
},
age: {
current: ''
},
birthday: {
day: '',
month: '',
year: ''
}
}
I was wondering how I would update these values ? i.e. I thought the following was correct
skillet.person.name.push({ first: 'blah', last: 'ha'});
but it’s wrong? How can I fix this?
If you want to mix an object into another one, you can use jQuery’s deep extend function. “Deep” means that it does not overwrite
namewith the new object, but rather overwrites the properties inside such an object.Now,
skillet.personhas the appropriate properties updated, while the other properties are untouched.