How to convert dictionary to CDT?

Certified Associate Developer

Hi all,

I am using an Appian integration with Google Maps in which I am passing an address to get the latitude and longitude of that address.  I am getting the result in dictionary format as follows:

 

Value

Dictionary success: true result: Dictionary headers: Dictionary Content-Type: "application/json; charset=UTF-8" Date: "Sat, 06 Jan 2018 04:41:42 GMT" Expires: "Sun, 07 Jan 2018 04:41:42 GMT" Cache-Control: "public, max-age=86400" Vary: "Accept-Language" Access-Control-Allow-Origin: "*" Server: "mafe" X-XSS-Protection: "1; mode=block" X-Frame-Options: "SAMEORIGIN" statusLine: "HTTP/1.1 200 OK" body: "{ "results" : [ { "address_components" : [ { "long_name" : "46", "short_name" : "46", "types" : [ "street_number" ] }, { "long_name" : "2nd Street", "short_name" : "2nd St", "types" : [ "route" ] }, { "long_name" : "Said Nagar", "short_name" : "Said Nagar", "types" : [ "neighborhood", "political" ] }, { "long_name" : "Balaji Nagar", "short_name" : "Balaji Nagar", "types" : [ "political", "sublocality", "sublocality_level_2" ] }, { "long_name" : "Virugambakkam", "short_name" : "Virugambakkam", "types" : [ "political", "sublocality", "sublocality_level_1" ] }, { "long_name" : "Chennai", "short_name" : "Chennai", "types" : [ "locality", "political" ] }, { "long_name" : "Tiruvallur", "short_name" : "Tiruvallur", "types" : [ "administrative_area_level_2", "political" ] }, { "long_name" : "Tamil Nadu", "short_name" : "TN", "types" : [ "administrative_area_level_1", "political" ] }, { "long_name" : "India", "short_name" : "IN", "types" : [ "country", "political" ] }, { "long_name" : "600092", "short_name" : "600092", "types" : [ "postal_code" ] } ], "formatted_address" : "46, 2nd St, Said Nagar, Balaji Nagar, Virugambakkam, Chennai, Tamil Nadu 600092, India", "geometry" : { "location" : { "lat" : 13.0556007, "lng" : 80.1981811 }, "location_type" : "ROOFTOP", "viewport" : { "northeast" : { "lat" : 13.0569496802915, "lng" : 80.19953008029151 }, "southwest" : { "lat" : 13.0542517197085, "lng" : 80.1968321197085 } } }, "place_id" : "ChIJgxfuDshmUjoR8SPovCPMInM", "types" : [ "street_address" ] } ], "status" : "OK" } " contentType: "application/json; charset=UTF-8" statusCode: 200 error: null (Null)

 

How can I extract only the latitude and longitude from the above format? Should I convert this dictionary format to CDT format? How can I achieve that?

 

Thanks in advance

 

  Discussion posts and replies are publicly visible