#1 : 19/11-23 02:11 Roberto Teixeira
Posts: 4
|
How do I do that (even in regex)? I´ve been hours trying to find out...
thanks in advance |
#2 : 19/11-23 20:29 Roberto Teixeira
Posts: 4
|
Reply to #1:
I've found myself what I needed to solve the situation. |
#3 : 20/11-23 15:40 Miguel
Posts: 163
|
Reply to #2: Would be nice to know how you did it.
|
#4 : 25/11-23 10:42 Eugene
Posts: 2
|
Reply to #3:
Had a similar requirement the other day, did it like this: ```javascript //function (index, item) { function swapElements(array, index1, index2){ var temp = array[index1]; array[index1] = array[index2]; array[index2] = temp; }; const name_arr = item.name.split('_'); swapElements(name_arr, 0, 1); return name_arr.join("_"); //} ``` |