That’s normal string parsing.
Scan for TOT="
and take the portion up to "
.
I’d use strstr()
for finding the first part and then again strstr()
or strpbrk()
.
Or, if you want the numeric value, locate the beginning (as above) and then take the string after TOT="
into atof()
or strtod()
Or you use the way shown in the docs
https://docs.particle.io/tutorials/topics/webhooks/#the-firmware-1