Compare different Chest Slots

I want to compare the Items in two different Slots. My way is: 1: get the data from Slot A (save it in a Storage) 2. Remove the Count data (because i only want to check If it is the same Item) 3. Get the data from Slot B (save in storage) 4. Remove 5. Compare both storage and If it is the same Trigger a Scoreboard

Is there a smarter way to compare this? Because i have to compare a lot.

Continue to help post