Answer the question
In order to leave comments, you need to log in
How to read a JSON string?
There is a vk api answer, but I don’t understand how to get information from there, for example, for alert
response: [{
id: 205387401,
first_name: 'Tom',
last_name: 'Cruise',
city: {
id: 5331,
title: 'Los Angeles '
},
photo_50: ' https://pp.vk.me/...0/pV6sZ5wRGxE.jpg ',
verified: 1
}]
Answer the question
In order to leave comments, you need to log in
to the console console.log(response)
To text:
alert(JSON.stringify(response))
var res = jQuery.parseJSON(response) if the request is json, then this string is not needed
alert(res.photo_50)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question