Open wanderleihuttel opened 1 year ago
You process Options in the same way that you process Fields. Each option is (should be) a Dictionary. You get the list of keys with the Keys method.
Change the loop contents to ...
If vItem.Exists("Options") Then
Debug.Print vItem("Name") & " - Exist Options"
ProcessOptions vItem("Options")
Else
Debug.Print vItem("Name")
End If
and then add ...
Sub ProcessOptions(vOptions As Variant)
Dim vDict As Scripting.Dictionary
Dim vKey As Variant
If Not TypeOf vOptions Is VBA.Collection Then
Debug.Print "*** Options not a collection = "; TypeName(vOptions)
Exit Sub
End If
For Each vDict In vOptions
For Each vKey In vDict.Keys
Debug.Print "", vKey, vDict(vKey)
Next vKey
Next vDict
End Sub
Hello Guys
How can I get data from Json "Name" and "Options"? How Option keys are always different, I would like to access using maybe the index?
I've read some another issues, but I didn't understand very well.
It would be interesting to include more examples in github, this could clarify how to use and avoid new issues.
My Json
Thanks