Company: Boomi_13oct
Difficulty: medium
REST API: Country Codes Problem Description Implement a function that formats phone numbers with the appropriate country calling codes. Given a country name and a phone number, your function should: Query the API at https://jsonmock.hackerrank.com/api/countries?name=<country> (replace <country> to retrieve the country's calling codes). If multiple calling codes exist, use the one at the highest index. Format the phone number as: +<Calling Code> <Phone Number> , like: +1 765355443 . Return "-1" if the country data array is empty. The API response contains a data field which is an array. If the country is found, the array contains exactly 1 element with country information. If not found, the array is empty. The country record includes: name : The country name (String) callingCodes : An array of the country's calling codes (String Array) Other fields not relevant for this task For example, if querying Afghanistan, a portion of the record would be: { "name": "Afghan