How to access a variable state from before an ajax request in the call back function
<p>EG</p>

<pre><code>for(i in an_object){

        $.getJSON("http//www...." + "?callback=?",'', function(data){
                // do something using what the value of i from when the JSONP request was sent
                // but i is always the last value in an_object because the loop 
                // has finished by the time the callback runs.
            );
        });
}
</code></pre>
