So I'm getting values and I want to put them into an array:
var values = {25,23,21}
var unit = {PCS,KG,PCS}
I want it to be like this when I put them in an array
array = {25:PCS,23:KG,21:PCS}
and group and add them depending on the unit so the final result will be something like this
totalval = {46:PCS,23:KG}
I can only put those values into separate arrays but I don't know how can I combine and group them..
