Below is an example of a print basket: how to get the items and re-save them

  removeFromBasket(woId: number) {
    const printItems = localStorage.getItem('print-basket');
    if (printItems) {
      const printItemsArray = JSON.parse(printItems);
      const filteredPrintItemsArray = printItemsArray.filter((item: any) => item.woId !== woId);
      localStorage.setItem('print-basket', JSON.stringify(filteredPrintItemsArray));
    }
  }

 

 

Saved you some valuable time?

Buy me a drink 🍺 to keep me motivated to create free content like this!