shahin
Active Member
This time I tried to parse data from json response using string manipulation. Upon running my script. I get nothing as result. Apparently, it seems to me that I did it the right way. However, a little twitch on my code might lead me to the right direction. Thanks in advance. Here is the link to that :"http://jsonplaceholder.typicode.com/users" and this is what I tried:
Code:
Sub Json_data()
Dim http As New XMLHTTP60, itm As Variant
With http
.Open "GET", "http://jsonplaceholder.typicode.com/users", False
.send
itm = Split(.responseText, "id"":")
End With
x = UBound(itm)
On Error Resume Next
For y = 1 To x
Cells(y, 1) = Split(Split(str(y), "name"":"" """)(1), """")(0)
Cells(y, 2) = Split(Split(str(y), "username"":"" """)(1), """")(0)
Next y
End Sub