Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

get promise result from json() javascript

// Full request
fetch(myRequest)
  .then(response => response.json())
  .then(data => {
      console.log(data);
});
  
// Function that returns response
myFunction().then(data => {
  	console.log(data);
});
 
PREVIOUS NEXT
Tagged: #promise #result #javascript
ADD COMMENT
Topic
Name
5+1 =