how do i get everything in the localstorage

I want to be able to create a list of favorite items with localstorage, but the items come from an api, so I did:

addFavorite (id) {

this.http.get ('’+id) .subscribe ((anime) => {
this.anime = anime; (id, JSON.stringify (this.anime));



but now I do not know how to list all the items, I was able to list only one. Help me