You can use a closure (via a self executing function) to capture the value of i for each invocation of the loop like this:
for (var i in obj) {
(function(index) {
// you can use the variable "index" here instead of i
$.ajax(/script/).done(function(data){ console.log(data); });
})(i);
}