MadGigs interview question

How would make an AJAX call to an external API & get the response in JSON format?