Home > front end >  Json variable substitution
Json variable substitution

Time:05-25

Want to put the inside of the json 13.0 replace variable a, 12.0 b replace variables how to realize?
Var a=13.0;
Var b=12.0;
Var json1={
"DeviceNumber" : "T123456789ABCDEF,"
"SensorData" :

{" value ":" 13.0 "},
{" value ":" 12.0 "}
]
}

CodePudding user response:

Var a=13.0;
Var b=12.0;
Var json1={
"DeviceNumber" : "T123456789ABCDEF,"
"SensorData" :

{" value ": a},
{" value ": b}
]
}
  • Related