Create definitive list from a stock inventory list

Hello Gliders.
I have a list of items with quantity if available items and I need a list with each item on a row, the same number of times of the described availability. This is hundreds of items and I don’t want to have to do it by hand if possible.

Can anyone think of a solution for this?

Can probably use some Google Apps Script to run a loop over the list of items, and then run another nested loop to repeat the rows n number of times.

I’ve done this now.