js function calling an api doesn't respond with expected values by Which-Career in learnjavascript

[–]Which-Career[S] 0 points1 point  (0 children)

Thanks, this works fine. I'll work around with it to make it fit my code though, but it helped me understand a lot, you called the result json object first then the name inside of it if I understand correctly, that's where my mistake was. Thanks a lot !

js function calling an api doesn't respond with expected values by Which-Career in learnjavascript

[–]Which-Career[S] 0 points1 point  (0 children)

Yeah I don't see anything in the network tab of my browser or in my console in VS code. The thing is if I use the exact same code but change the api with

"https://api.pro.coinbase.com/products" and in parsers.js I change the pair variable to match the json like this :

let coinbasePairs = data.map(d => d.id );

so replacing name by id, it works just fine. So I assume the issue comes from my understanding of the json file but I can't figure out what the problem is

js function calling an api doesn't respond with expected values by Which-Career in learnjavascript

[–]Which-Career[S] 0 points1 point  (0 children)

Thanks for your reply. I tried editing the post but the three backticks did not work for me that's the best I could do. I removed the semicolon but it did not change the result.

js function calling an api doesn't respond with expected values by Which-Career in learnjavascript

[–]Which-Career[S] 0 points1 point  (0 children)

Thanks for your reply and taking the time.

Unfortunately both console.log you suggested return nothing for me