The problem is that jQuery resolves its ajax promises with 3 arguments, which then become an array of values when you are using $.when
on multiple promises. To get only the data
(the first argument of each ajax callback), use
var promise = $.when(
ajaxRequest1,
ajaxRequest2
).then(function(resp1, resp2) {
return [resp1[0], resp2[0]];
});