diff options
author | Jan-Simon Moeller <jsmoeller@linuxfoundation.org> | 2016-12-22 13:44:40 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@automotivelinux.org> | 2016-12-22 13:44:40 +0000 |
commit | 39892431d66f8bf95070a24de23e6b24ff1d73fd (patch) | |
tree | 81a5085318a664bfb9534ede367518ebe57bdcbe /app/wifi | |
parent | 119266035058058fb897e8e21185435867086a94 (diff) | |
parent | d65ac66373d37947c1bba80df10e3541b9210aa4 (diff) |
Merge "Wifi: improve parsing JSON"
Diffstat (limited to 'app/wifi')
-rw-r--r-- | app/wifi/Wifi.qml | 5 |
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++) { |