{
"name": "Albania",
"topLevelDomain": : [
".al"
],
"callingCodes": [1 item],
"capital": "Tirana",
"altSpellings": [
"AL",
"Shqipëri",
"Shqipëria",
"Shqipnia"
],
"region": "Europe",
"population": 2837743,
"latlng": [2 items],
"demonym": "Albanian",
"area": 28748,
"gini": 33.2,
"timezones": [1 item],
"borders": [4 items],
"nativeName": "Shqipëria",
"numericCode": "008",
"flags": {2 items},
"currencies": [1 item],
"languages": [
{
"iso639_1": "sq",
"iso639_2": "sqi",
"name": "Albanian",
"nativeName": "Shqip"
}
],
"translations": {11 items},
},{},{}...
If there is a matching value in the object according to the input from the user, I want to return those objects. For example, I want to find the single object where the id is “Albani” and return that object or I want to find the only value where the id is “Shqip” and return that object.
Api:https://restcountries.com/v2/all
function(input){
return obj
}