Skip to content

Instantly share code, notes, and snippets.

@djadriano
Created May 23, 2012 14:02
Show Gist options
  • Save djadriano/2775398 to your computer and use it in GitHub Desktop.
Save djadriano/2775398 to your computer and use it in GitHub Desktop.
extend array objects with jquery
copy = {
bundle_offers : [
{
title : 'teste1'
},
{
title : 'teste2'
}
]
}
copy.bundle_offers[ 0 ] = $.extend({}, copy.bundle_offers[ 0 ], {
description : 'description'
});
console.log( copy.bundle_offers );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment