Just dipping my toes into Angular2/Typescript as I work on my very first web application.
I've been experimenting with calling a web API using POST, and it's working smoothly. When I intercept the call with FIDDLER, I'm able to see the JSON response without any issues.
Now, my next step is figuring out how to log the JSON output in the browser console.
Here's the code snippet:
code snippet
var s = this.myService.doSearch();
s.subscribe(
data=> this.data = data,
error => this.errorMessage = <any>error
);
console.log(s);
service method
doSearch() {
var url = this.baseUrl;
return this.http.get(url)
.map(response => response.json())
.catch(this.handleError);
}
So, the burning question is: where and how can I access and manipulate the JSON Output?
Thanks!