Hello
I have a json retrieved from remote web
I got this with httpjob and used the code below :
log m gives me :
How can i retrieve the "rate_float" from this map ? m.get("rate_float") is not working.
TY
I have a json retrieved from remote web
B4X:
{"time":{"updated":"Dec 19, 2016 12:30:00 UTC","updatedISO":"2016-12-19T12:30:00+00:00","updateduk":"Dec 19, 2016 at 12:30 GMT"},"bpi":{"USD":{"code":"USD","rate":"791.3488","description":"United States Dollar","rate_float":791.3488},"TRY":{"code":"TRY","rate":"2,770.3276","description":"Turkish Lira","rate_float":2770.3276}}}
I got this with httpjob and used the code below :
B4X:
Dim parser As JSONParser
parser.Initialize(res)
dim m as map = parser.nextobject
log m gives me :
B4X:
time = "(read only map) {\n updated = \"Dec 19, 2016 12:34:00 UTC\";\n updatedISO = \"2016-12-19T12:34:00+00:00\";\n updateduk = \"Dec 19, 2016 at 12:34 GMT\";\n}";
}
{"time":{"updated":"Dec 19, 2016 12:34:00 UTC","updatedISO":"2016-12-19T12:34:00+00:00","updateduk":"Dec 19, 2016 at 12:34 GMT"},"bpi":{"USD":{"code":"USD","rate":"791.0175","description":"United States Dollar","rate_float":791.0175},"TRY":{"code":"TRY","rate":"2,770.3276","description":"Turkish Lira","rate_float":2770.3276}}}
code":"TRY","rate":"2,770.3276","description"
How can i retrieve the "rate_float" from this map ? m.get("rate_float") is not working.
TY