This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm that you accept these cookies being set.

[?] table name LUA
#5
(21.05.2019, 06:12)admin Wrote: Example:

Code:
require('json')

data = '{"112063000":[{"end":1558379700000,"regionName":"Kreis Havelland","start":1558377900000,"type":0,"state":"Brandenburg","level":2,"headline":"Amtliche WARNUNG vor GEWITTER","description":"Es treten Gewitter auf. Dabei gibt es Windböen mit Geschwindigkeiten bis 60 km/h (17m/s, 33kn, Bft 7).","stateShort":"BB","instruction":"ACHTUNG! Hinweis auf mögliche Gefahren: Örtlich kann es Blitzschlag geben. Bei Blitzschlag besteht Lebensgefahr!","altitudeStart":null,"altitudeEnd":null,"event":"GEWITTER"}]}'

decoded = json.decode(data)
log(decoded['112063000'][1])

thank. sorry I was not precize enought.

here is the JSON

https://www.dwd.de/DWD/warnungen/warnapp...nings.json

I would need to pick "112063000" out of it.

But I guess leading number is the problem as it is for "3h" is...

Best
Reply


Messages In This Thread
[?] table name LUA - by Allesreinwasgeht - 20.05.2019, 18:35
RE: [?] table name LUA - by admin - 20.05.2019, 18:52
RE: [?] table name LUA - by Allesreinwasgeht - 20.05.2019, 19:06
RE: [?] table name LUA - by admin - 21.05.2019, 06:12
RE: [?] table name LUA - by Allesreinwasgeht - 21.05.2019, 08:30

Forum Jump: