I tried that but ended-up with a table (I think?).
Most likely, I’m not understanding how to access the keys or tags in the table?
`local request=http.get("https://www.googleapis.com/youtube/v3/channels?part=statistics&id="+channel+"&key="+key,{ "Accept" : "application/json" } )
local responseTable=request.sendsync();
if (responseTable.statuscode == 200)
{
local data=http.jsondecode(responseTable.body);
server.log(data);
// not sure here how to read the various JSON elements of the array.
} else
{
server.log("Error response: " + responseTable.statuscode);
}`
local viewCountToDisplay = data.item[0].viewCount.tointeger();
ie. table data has a key, ‘item’: get its first element, also a table, and return the value of the key ‘viewCount’. Since that’s rendered as a string, convert it to an integer.
YES! Using your idea of poking around with keys, I discovered the correct key path to get the number of subscribers. Thanks so much for pointing me in a direction.