How do you decode JSON that is one array of integers?

I’ve successfully fetched data from https://hacker-news.firebaseio.com/v0/topstories.json?print=pretty and have it as type Data, but I’d like it to be of type [Int] and extract each integer from it. All of Apple’s developer content seems to involve key/value pairs, but this JSON doesn’t have a key.

Powered by WPeMatico

You may also like...

Comments are closed.