I want to display 10 numeric and text values from a json file
TP=10
dim Mag(TP) : dim Loc$(TP)
' Read event history from file into array.
for lcnt = 1 to TP
Mag = val(json$(result$,"properties.mag[" + str$(lcnt) + "]" )) <<<This is a number (e.g 5.1.3.2 etc)
Mag(lcnt) = Mag
Loc$ = json$(result$,"properties.flynn_region[" + str$(lcnt) + "]") <<<This is text (E.g Hawaii, Hawaii)
Loc$(lcnt) = Loc$
next lcnt
tft.text.draw str$(Mag(1)),100,90,3 <<Works
tft.text.draw str$(Loc$(1)),100,100,3 << Does not work (Type mismatch)
Json:
"type": "Feature",
"id": "20220218_0000088",
"properties": {
"lastupdate": "2022-02-18T13:16:00.0Z",
"magtype": "mb",
"evtype": "ke",
"lon": -25.39,
"auth": "GFZ",
"lat": -56.67,
"depth": 15.0,
"unid": "20220218_0000088",
"mag": 4.9,
"time": "2022-02-18T02:29:31.9Z",
"source_id": "1098163",
"source_catalog": "EMSC-RTS",
"flynn_region": "SOUTH SANDWICH ISLANDS REGION"
}
How can I display the values of Loc$(1) (2) etc?