1

I have a json from get using following rest API

https://maps.googleapis.com/maps/api/geocode/json?address=Colombo&key=AIzaSyBt18lOhS5T9PlV1I2FVYooc4dKsSJZYAA

Need to know how to get followings

Read Json String and need to get Json parameter values , e.g - Value of "address_components" array element Get value from "formatted_address"

Here is the code I used for get Json string from above API

Dim restReq, url,restReq1,strOutput
Set restReq = CreateObject("Microsoft.XMLHTTP")

url = "https://maps.googleapis.com/maps/api/geocode/json?address=Colombo&key=AIzaSyBt18lOhS5T9PlV1I2FVYooc4dKsSJZYAA"
restReq.open "GET", url, false
'HTTP.Open "GET", ("https://adcenterapi.microsoft.com/Api/Advertiser/v7/CampaignManagement/CampaignManagementServiceRest.svc/customer/account/{my_account_id}/campaign"), False, "{my_user_name}", "{my_password}"
    restReq.send
Dim result
result = restReq.responseText

appreciate you response.

thanks, pree.

  • 1
    Possible duplicate of [Decode/Encode JSON with VBScript](https://stackoverflow.com/questions/12153925/decode-encode-json-with-vbscript) – Regis Desrosiers Feb 13 '18 at 15:54

0 Answers0