var myObj = { 'b': 'asdsadfd', 'c': 'masdasaf', 'a': 'dsfdsfsdf' }, keys = [], k, i, len; for (k in myObj) { if (myObj.hasOwnProperty(k)) { keys.push(k); } } keys.sort(); len = keys.length; for (i = 0; i < len; i++) { k = keys[i]; alert(k + ':' + myObj[k]); }