getSchema(fileName): any {
this.http.get(fileName)
.map(this.extractData)
.catch(this.handleError)
.subscribe(data => {return data})
}
This function returns undefined. If using console.log instead of return, it logs the populated data. return stops it from awaiting the data response.
I'm trying things with an observer but it is looking like more code than necessary. What is the simplest way to get this code working (returning the data from the function)?