summaryrefslogtreecommitdiffstats
path: root/app/wifi
diff options
context:
space:
mode:
authorJan-Simon Moeller <jsmoeller@linuxfoundation.org>2016-12-22 13:44:40 +0000
committerGerrit Code Review <gerrit@automotivelinux.org>2016-12-22 13:44:40 +0000
commit39892431d66f8bf95070a24de23e6b24ff1d73fd (patch)
tree81a5085318a664bfb9534ede367518ebe57bdcbe /app/wifi
parent119266035058058fb897e8e21185435867086a94 (diff)
parentd65ac66373d37947c1bba80df10e3541b9210aa4 (diff)
Merge "Wifi: improve parsing JSON"
Diffstat (limited to 'app/wifi')
-rw-r--r--app/wifi/Wifi.qml5
1 files changed, 2 insertions, 3 deletions
diff --git a/app/wifi/Wifi.qml b/app/wifi/Wifi.qml
index 1a5812a..cc58055 100644
--- a/app/wifi/Wifi.qml
+++ b/app/wifi/Wifi.qml
@@ -303,9 +303,8 @@ SettingPage {
console.log(o.responseText)
// translate response into object
- var jsonObject = eval('(' + o.responseText + ')')
- var jsonObjectNetworks = eval('(' + JSON.stringify(
- jsonObject.response) + ')')
+ var jsonObject = JSON.parse(o.responseText)
+ var jsonObjectNetworks = jsonObject.response
console.log("WiFi list refreshed")
//console.log(jsonObject.response)
for (var i = 0; i < jsonObjectNetworks.length; i++) {