[Solved] How do I clear out an inventory?

How do I…

How do I clear out all item count in an inventory?

What is the expected result

I have an inventory named items and there is an item1 on that inventory. What I wanted is if there are 5 item1 I push a button and remove all 5 of item1.

What is the actual result

I could only find remove item which just removes 1 item1. Do we have a method for this or do I need to loop through item1 and remove 1 until everything is gone. Thanks!

I don’t know what inventory’s do yet in gdevelop lol so idk sorry lol

UPDATE: I figured it out. I just need to use the while event to check if item1 has an item and would repeatedly remove the items until everything is gone.