[
{
"topic": "/house/switch1/",
"value": 0
},
{
"topic": "/home/in/sensor1/temp/",
"value": 22.5
}
]
<!DOCTYPE html>
<html>
<body>
<script>
let obj = JSON.parse('http://ecosnet.ru/esp/json.php');
console.log(obj[1].topic);
console.log(obj[1].value);
</script>
</body>
</html>