From 93f8560a74002b9bcc37acdb3607c1a345054fa3 Mon Sep 17 00:00:00 2001 From: Christian Herzog Date: Tue, 8 Oct 2019 20:43:29 +0200 Subject: [PATCH] sort entries in nvs editor --- components/wifi-manager/code.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/components/wifi-manager/code.js b/components/wifi-manager/code.js index 454010ff..bab07b6e 100644 --- a/components/wifi-manager/code.js +++ b/components/wifi-manager/code.js @@ -666,7 +666,7 @@ function checkStatus(){ function getConfig() { $.getJSON("/config.json", function(data) { - for (var key in data) { + Object.keys(data).sort().forEach(function(key, i) { if (data.hasOwnProperty(key)) { if (key == 'autoexec') { if (data["autoexec"] === "1") { @@ -691,7 +691,7 @@ function getConfig() { ); $("input#"+key).val(data[key]); } - } + }); $("tbody#nvsTable").append( ""+ ""+