DEV Community


Posted on


REST countries API I need some help

I am taking this challenge, I am getting stuck that one requirement is to click the border name to get the detail of that country.

This is my code, I need some help. (I haven’t done any css styling yet)

Merry Christmas!

Top comments (3)

mustafaanaskh99 profile image
Mustafa Anas

Amazing buddy. What a great way to spend christmass :)
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!

xnslx profile image

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!


nikkuv profile image
Saumya Verma

I'm stuck at the same place as you. Thanks for posting for help here. I'm glad to get this.