Split an entry in the database 1x5 to 5x1

Hello everybody, I have a list of products and each product has a quantity asigned
I want to split the product into whatever quantity the product has so for example:
Lemons x3
Would turn into:
I’ve tried to run a loop in a back end workflow but I cant make it work
Is there any easy way of achiving this?