Problem reading from JSON

Hi,

I’m having trouble parsing a JSON. I’m new to it and tried ParseJSON already but I’m not able to read values from it.

Better I explain it with my example:
I want to use the data from https://api.awattar.de/v1/marketdata and want to transfer it to a listbox.

The data I get looks like this:

{
“object”: “list”,
“data”: [
{
“start_timestamp”: 1615240800000,
“end_timestamp”: 1615244400000,
“marketprice”: 53.14,
“unit”: “Eur/MWh”
},
{

How can I transfer this data for example to a listbox? I know how to fill a listbox but I have problems reading the JSON and get the fields. It is certainly not complicated :innocent:

I am very grateful for suggestions.

var j as Dictionary = ParseJSON( jsonString )
var objectName as string = j.Value( "object" )
var data() as variant = j.Value( "data" )
var item1 as Dictionary  = data( 0 )
2 Likes

Thank you Kem. Works perfectly :+1:t2: