two JS variables refer to same Json object how to keep one constant?
<p>I have </p>

<pre><code>    $.getJSON('json.ashx?mode=Gender', function (data) {
            memberInfo = data[1]; 
            options.series = data;
            originalData = data[0];
            ...
            ...
    });
</code></pre>

<p>which returns</p>

<pre><code>[
{"type" : "pie","name" : "Gender",
"data" : [["Male",32],["Female",11]]},
{"A123":"F","A223":"M","A423":"F","A332":"M","B327":"F"}
]
</code></pre>

<p>and</p>

<pre><code>    function calcOptionsData() {   
    ...    
    var maleCount = 0;
    var femaleCount = 0;       
    ...              
    ...
    $.each(val, function(index, item) {
        if (memberInfo[item] == 'M')                    
            maleCount += 1;

        if (memberInfo[item] == 'F')                    
            femaleCount += 1;
    });

    options.series[0].data[0][1] = originalData.data[0][1];
    options.series[0].data[1][1] = originalData.data[1][1];

    if (radioBttnClicked == 'Gender')
    {

        options.series[0].data[0][1] += maleCount;

        options.series[0].data[1][1] += femaleCount;
    }
} 
</code></pre>

<p>I want every times the calcOptionsData() called the originalData resets the options.series[0].data to the value originally generated from the getJSON. The current code mirrors originalData with options.series[0].data.</p>

<p>Thanks,</p>
