Object keys

будет обновлено

var temp = {"1":"1297076700360","2":"1297076700005","3":"1507076705555","4":"1297076700000"};

var sortedTemp = Object.keys(temp).map(function (key) {
                        return [key, this[key]]
                    }, temp).sort(function (a, b) {
                        return b[1] - a[1]
                    });
                    
                    sortedTemp.forEach(function(index){
                        //console.log()
                    });

Опубликовано в "Javascript" Просмотры 4715            Oпубликованный 27/12/2018

Все комментарии (0)
Нет комментариев