Travelers interview question

How would you access a nested array/object from an API call and return the data or check for a specific field?