Bill Noble Bill Noble - 1 year ago 87
Javascript Question

JSON parsing incorrectly

I am trying to extract data from the result of a Google Places call.

If I run the following Javascript:


I get the following output, as expected:


However if I put .lat on the end to extract the lat value and run:


I get:


And if I run the alert without the JSON.stringify as follows:


I get:

function (){return a}

What am I doing wrong?

Answer Source

You must do this:

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download