What is the best way to iterate over a JSON response from an API when the response can severely different? I have a solution and it works but it looks incredibly clunky and unop