JSON Parse

Looking to parse a received Json string and store it in a database. (The database part is working already)
I understand it should be a dictionary probably in a dictionary, but how do I iterate over it to get the value pairs of date / price.

Dim str as String Dim firstLevel As Xojo.Core.Dictionary Dim aString As String = content.DefineEncoding(Encodings.UTF8) firstLevel = Xojo.Data.ParseJSON(aString.toText) For Each d2 As Xojo.Core.DictionaryEntry In firstLevel Dim secondLevel As Xojo.Core.Dictionary secondLevel = d2.Value System.DebugLog(d2.Value) Next

The string looks like this:

{“symbol”:“GBPEUR”,“history”:{“2020-02-27”:“1.172015”,“2020-02-26”:“1.185655”}}

So far it crashes “Expected Object but got Text”

Markus

this list the date and value

[code]Var j As String = TextField1.Value

Var ji As New JSONItem(j)

Var j0 As JSONItem = ji.Child(“history”)

For Each name As String In j0.Names
System.DebugLog(name)
System.DebugLog(j0.Value(name))
Next[/code]

Brilliant, thank you !