I have arrays of arrays called arr, and I want to split the second value of each array. This means that if I 0-6, I would like to change it to'0','6'
What I have:
arr = [['PROVEEDOR', '0-6', '11111'], ['tiempo ida pulidor', '6-14', '33333']]
What I would like:
arr = [['PROVEEDOR', '0', '6', '11111'], ['tiempo ida pulidor', '6', '14', '33333']]
How can I do this conversion? This is always the second value and always has two numbers. I know what I should use .split('-'), but I know that I don’t know, to make it work here, to make a replacement, since I have to repeat all the arrays included in arr.
Thanks in advance.
source
share