Angular 6 observables - extract data from .subscribe() function and use it elsewhere
问题 I'm banging my head against the wall with observables. Almost all of the documentation I can find is in the older rxjs syntax. I have an API call which is an observable. I'm calling it elsewhere and subscribing to it - trying to populate a table with the data from this GET request. If I simply console.log my getData function, it logs the subscription rather than my data. I can successfully console.log data within the .subscribe function, but I want to use data outside of .subscribe() . How do