For the sake of another answer... (though I rather liked the first one from @lipp)
Here is a function that deep clones your object and swithches the answer key for the new key.
Problem this will substitue any key answer wherever it may find it. So that if you do this:
clone({"question": "", "answer" : [{"subject": "", "teacher": "", "answer": [] ] } })
Result is
{"question": "", "new" : " " }
var toClone = {"question": "", "options" : [{"subject": "", "teacher": "", "answer": [] ] } };
function clone(original){
var copy;
if (original instanceof Array) {
copy = [];
for (var i = 0, limit = original.length; i < limit; ++i) {
copy[i] = clone(original[i]);
}
} else if (original instanceof Object) {
copy = {};
for (var key in original) {
if( key === "answer" ){
copy["new"] = " ";
} else
copy[copiedKey ] = clone(original[key]);
}
} else
copy = original;
return copy;
}