This happens because JavaScript object items do not have order.
In order to fix it you may use two arrays: one with the keys, and second with values:
var keys = [134, 140, 131],
values = ["A", "B", "C"];
$.each(keys, function(i, key) {
console.log(key, values[i]);
});