How about...

<cfoutput>#theData.results[1].formatted_address#</cfoutput> 

-----Original Message-----
From: Les Irvin [mailto:[email protected]] 
Sent: Thursday, February 14, 2013 4:12 PM
To: cf-talk
Subject: JSON to CF variable?


Taking this JSON result from Google:
http://maps.googleapis.com/maps/api/geocode/json?address=34.172684,-104.6047
94&sensor=false

How would I address the "formatted_address" result as a CF variable?

I've gotten this far:
<cfhttp method="Get" url="
http://maps.googleapis.com/maps/api/geocode/json?address=34.172684,-104.6047
94&sensor=false">
<cfset theData=DeserializeJSON(cfhttp.FileContent)> <cfdump var="#theData#">

...but then I'm stuck. I need #whatevergoeshere# = "County Road 1-11, Yeso,
NM 88136, USA"



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:354528
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm

Reply via email to