Ero sivun ”Widget:ThreadsX” versioiden välillä
Järvi-meriwikistä
Rivi 26: | Rivi 26: | ||
var threads = request.query.threads; | var threads = request.query.threads; | ||
− | + | var threadsA = []; | |
− | |||
var threadsO = {}; | var threadsO = {}; | ||
− | for ( var t in threads ) { | + | for ( var t in threads ) { threadsA.push( threadsO[ t ] ); } |
− | + | threadsA.sort(function(a,b) { return parseFloat(b.created) - parseFloat(a.created) } ); | |
− | + | ||
− | + | console.log(threadsA); | |
var threadsArr = new Array(); | var threadsArr = new Array(); |