Post 19 made on Friday September 4, 2020 at 20:09 |
mpg7321 Regular Member |
Joined: Posts: | June 2020 109 |
|
|
The quick and dirty way, I assume you have the returned data in a varable.
var returneddata = socket.read(); var value = returneddata.split('"value":').pop().split('.')[0];
That should give you 40 not 40.0, if you want 40.0 try,
var value = returneddata.split('"value":').pop().split(',"status"')[0];
This has worked for me with KODI that uses Json.
|
|
|