I'm using an ajax call in order to retrieve data from the youtube api.I managed to receive the jason,however I'm not really sure how could I extract the field i need.
I will attach an image with what I'm getting.
Console print with the actual result
I tried to convert this json to an object,also I tried to retrieve it as I would with a normal vector element(using the layers as indexes),but nothing seems to work.
Also,is there any way to retrieve from the youtube API just the "textDisplay" field?(So I could pass it to a Highchart(Javascript library for charts) and draw the chart directly?)
My call looks like this:
$.ajax({
dataType: "json",
type: 'GET',
url: "https://www.googleapis.com/youtube/v3/commentThreads?part=snippet&maxResults=5&videoId=lyZQPjUT5B4&fields=items%2Fsnippet%2FtopLevelComment%2Fsnippet%2FtextOriginal&key=[thereisMyKey]"
}
*Using this call will probably fail,since I have not provided you the key