I have an async function that fetch data. In order to manipulate the data returned, I used from()
to convert the Promise to an observable and use pipe()
to manipulate the data. Is is possible to convert it back to Promise after pipe()
? I have tried the following but it didn't work:
getOrder() {
return from(asyncFunctionToGetOrder())
.pipe(map(data) =>
//Processing data here
return data;
))
.toPromise(); //This won't work
}