Created
May 23, 2012 14:02
-
-
Save djadriano/2775398 to your computer and use it in GitHub Desktop.
extend array objects with jquery
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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