Answer the question
In order to leave comments, you need to log in
Need to decide on the structure of an unknown html page?
Hello, there is a device that raises its mini web (monitor of energy and temperature). On the web page of the device ip_address/energy I see such an array
energy|{"Ts":"380158","Va":"232.00","Aa":"0.37","Pa":"56","PFa":"0.65","T0":"18.94"}|div
Answer the question
In order to leave comments, you need to log in
var s = 'energy|{"Ts":"380158","Va":"232.00","Aa":"0.37","Pa":"56","PFa":"0.65","T0":"18.94"}|div';
s = s.split('|');
s[1] = JSON.parse(s[1]);
console.log(s);
console.log(s[1].Va); //232.00
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question