Dynamic REST API call angular
I have updated the code according to your requirement. I have made use of the observables to fetch the live data here in the link https://stackblitz.com/edit/stackoverflow-24-06-2019-ewzpst?file=src/app/app.component.html