RPGDATA = {
turkey: 'Leg',
chicken: 'Muffin'
}
var tempdata = RPGDATA;
RPGDATA.turkey = 'NoLeg';
console.log(tempdata); // I'm seeing 'NoLeg' here, but shouldn't it be 'Leg'?
console.log(RPGDATA);
Check out this code on jsfiddle: http://jsfiddle.net/njxd7eLy/1/
Why is tempdata showing the updated object instead of the original data?
Update: Here's an example for clarification: http://jsfiddle.net/zLeufxfm/ The old data is stored in tempdata, but not as a separate object.