I have the following response in JSON from Youtube Data API
{
"kind": "youtube#channelListResponse",
"etag": "\"0KG1mRN7bm3nResDPKHQZpg5-do/B7stMlWJTBpmW2q34yWKIzz8fF8\"",
"pageInfo": {
"totalResults": 1,
"resultsPerPage": 1
},
"items": [
{
"kind": "youtube#channel",
"etag": "\"0KG1mRN7bm3nResDPKHQZpg5-do/vV2FFZUI5inz53NuQDJMTs3tdQk\"",
"id": "UCwy6X3JB24VTsDFqMwdO5Jg",
"contentDetails": {
"relatedPlaylists": {
"uploads": "UUwy6X3JB24VTsDFqMwdO5Jg"
},
"googlePlusUserId": "114467711950028252332"
}
}
]
}
I'm trying to turn it into an object using JSON.parse
but doing so gives me this.
{ kind: 'youtube#channelListResponse',
etag: '"0KG1mRN7bm3nResDPKHQZpg5-do/B7stMlWJTBpmW2q34yWKIzz8fF8"',
pageInfo: { totalResults: 1, resultsPerPage: 1 },
items:
[ { kind: 'youtube#channel',
etag: '"0KG1mRN7bm3nResDPKHQZpg5-do/vV2FFZUI5inz53NuQDJMTs3tdQk"',
id: 'UCwy6X3JB24VTsDFqMwdO5Jg',
contentDetails: [Object] } ] }
How can I turn the value of contentDetails
into a proper object?