help
How to sort array in JS for Leaflet map and then rtim it
1 Answer
Know the answer? Post it. Somebody with the same question will find it here.
help
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Abhishek YadavRank #217 · 11.3K reputationPosted Oct 23, 2022, 1:19 PM EDT
let arr = [] polylineTimestamp.forEach((el) => { arr.push([el[0],el[1]]) }) console.log(arr) //! expected output would be arr = [ [ 37.781814, -122.40474 ], [ 37.781719, -122.404637 ], [ 37.781489, -122.404949 ], [ 37.780704, -122.403945 ], [ 37.780012, -122.404827 ] ]