CARFAX Interview Question

Write a program to make an API call and fetch data in JSON format, read it under certain conditions.