Updating javascript object property?

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 though the following was correct

skillet.person.name.push({ first: 'blah', last: 'ha'});

but it’s wrong ? How can I fix this ?

45 thoughts on “Updating javascript object property?”

Leave a Comment