Ollie Jones
Ollie Jones

Reputation: 447

How to target specific JSON output using Jquery?

In the linked jsfiddle I am trying to output a certain result from the JSON. I assume the issue is the line

var address = data[results][0][address_components][1][long_name];

but through trial and error I am still unable to target the desired data.

http://jsfiddle.net/JzMuy/

Many thanks

Upvotes: 0

Views: 306

Answers (1)

JaredMcAteer
JaredMcAteer

Reputation: 22545

Actually the problem is that you cannot preform a Cross Site access request. You either have to do it with server side code or utilize the JSONP api (if it provides it)

Upvotes: 2

Related Questions