DEV Community

Discussion on: REST countries API I need some help

Collapse
 
mustafaanaskh99 profile image
Mustafa Anas

Amazing buddy. What a great way to spend christmass :)
Anyways,
I had a quick look at your js code and the countries API. You seem to be on the right track.
If you take a look again at the API, each object has a field called 'cioc'. Which is the short name of the country. These are the same names used in the borders field in each object. So all you need to do is take the value of the border button, pass it to a search function that gets you the country by its "cioc", then display it.
I am not gonna give you anymore hints coz I can see that you can easily do it.
Good luck!

Collapse
 
xnslx profile image
xnslx

Hey, thank you for replying to me. I have been got stuck for nearly a week without coming up a solution. I need some hints based on my code. Happy holiday!

-Xian