Turns out this was way simpler than I was making it. I didn't look hard enough at the JSON response for some reason, anyway now I am just indexing directly into the playlist ID, no need for any of the manipulation.