The data format I got back from URL is in this format:
#RES#[{"status":"Stopped \/ Idle","val":17.469444444444,"unit":"617-0003"},{"status":"Working","val":0,"unit":"617-0003"},{"status":"Headland Turning","val":0,"unit":"617-0003"},{"status":"Transport","val":0.15333333333333,"unit":"617-0003"}]
I want to reformat it into:
[
{
"status": "Stopped \/ Idle",
"val": 17.469444444444},
{
"status": "Working",
"val": 0},
{
"status": "Headland Turning",
"val": 0},
{
"status": "Transport",
"val": 0.15333333333333}
]
Note:
- Remove the beginning string
#RES# - delete a field
"unit"
Thanks.
1 Answer