A
A
arudmin2013-12-19 00:14:41
JavaScript
arudmin, 2013-12-19 00:14:41

attribute with colon in json

I get a JSON response with the following content:
"data": {
"itunes:explicit": "text",
"itunes:image": Object,
"itunes:owner": Object,
"itunes:summary": "some text"
}
Here is the working code: jsbin.com/EyiKIKug/3/edit?js,console
How to get the value of "itunes:summary" parameter?
Thank you.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
S
Sergey Melnikov, 2013-12-19
@mlnkv

in theory, if the json string that comes is correct, then

var obj = JSON.parse(/* строка JSON */);
obj.data['itunes:explicit'] //нужное свойство

E
Eugene, 2013-12-19
@pushthebutton

Head-on with JSON.parse will not work.

"itunes:image": Object,
"itunes:owner": Object,

Object <- what is this?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question