I have these 3 arrays
names = ["tomatoes", "bananas", "carrot", "tshirt", "microwave"]
categories = ["food", "food", "food", "clothing", "kitchen"]
prices = ["1.49", "0.79", "1.99", "7.99", "200.99"]
I want to create and array like this for each of them
["food", "tomatoes", "1.49"]
I have lots of data so i am trying to create a function that will do this more efficiently then I will try to combine everything into one big array. Ex: [["food", "tomatoes", "1.49"], ["food", "bananas", "0.79"], ["food", "carrot", "1.99"], ["clothing", "tshirt", "7.99"], ["kitchen", "microwave", "200.99"]]
I tried using map but I'm not that familiar with programming so I cant wrap my head around this