We supply the name of the function to call on return ("gotResult").
This is an asynchronous call: we can do other things while waiting for the result.
Function gotResult(data)
txtData.value = ""
If data["error"] Then
txtData.value = data.error.message
Else
For Each item in data
txtData.value = txtData.value & Eval("item") & ": " & item & vbCRLF
Next
End If
End Function
The data returned will be a JSON object, stored in data.
This code dumps the name and value of the fields in data.