Programming Reference Manual
 
Syntax
 
result = DecodeJSON(Data[, FieldName])
 
Description
Return an two-dimensional array of string containing fields and values of the JSON-encoded datastring. Optionally returns one non-array value (string) when FieldName is specified.
 
Parameter
Description
Data
JSON encoded string of fields and values.
FieldName
Optional. When specified, the function returns only the value of this field as a string.
See Also
Example
 
Sub Main
 
Dim Arr() as Variant
Dim x as Integer, z as Integer
 
ReDim Arr(0,0)
 
    Arr() = DecodeJSON("{""Message"":""Hello World!"",""Show"":"True""}")
 
    z = Ubound(Arr)
    For x = 0 to z
       Debug.Print Arr(x,0)
       Debug.Print Arr(x,1)
       Debug.Print "----------"
    Next
 
   Msgbox DecodeJSON("{""Message"":""Hello World!"",""Show"":"True""}", "Message")  '"Hello World!"
 
End Sub