Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

convert fetch data to json

fetch("localhost:3000/api/home") // first step
  .then(response => response.json()) // second step
  .then(data => {
    console.log(data)
  })
  .catch(error => console.error(error))
 
PREVIOUS NEXT
Tagged: #convert #fetch #data #json
ADD COMMENT
Topic
Name
8+9 =