Skip to content

Tag: json

javascript: how to get all ids of a json array with for loop

I’m having a problem getting the different ids from my json object. I get are the id of the last item. This is the function: This is the json array I get: Thanks to all in advance Answer The concrete error in your code was this line: It needs a “+” before the “=” to add more stri…

Uncaught in promise while waiting for json response

I’m implementing Promises for the first time in JS and am getting uncaught in promise exception in console log while running the below code. I am handling the result of the promise return value in the main function as below and am yet getting the uncaught in promise message: The logic behind the data_pr…