Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

angular convert response to json

getSomeDataFromSomeAPI(){
  //res.json() does the trick, .json() function belongs to Response Object
  return this.http.get("https://someApi.com/api/getData")
  .map(res => res.json()).toPromise();
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #angular #convert #response #json
ADD COMMENT
Topic
Name
9+4 =