jquery if condition issue
<p>I have a function to push array, but i am getting the issue, because of allways my conditions are checking together. apart from this, if i use curly brase i am getting created the array no. of times. even i unable to explain properly here, pls look my code :</p>

<pre><code>$.map(pObj,function(values,i){
    if(typeof pieArray[values.GeoID] == 'undefined')
        pieArray[values.GeoID] = []; //it should create only one time

    pieArray[values.GeoID].push(values.ResponsePercentage); // when it matches it should not go down to check next if. else it can go.

    if(!values.GeoID &amp;&amp; typeof pieArray[0] == 'undefined')
        pieArray[0] = []; //it should create only one time

    pieArray[0].push(values.ResponsePercentage); //now the top if get response, till it is checking and throwing error. top if not match, then it need to work.
});
</code></pre>

<p>how can i achieve this?</p>
