I am a bit of a novice here, so I will just jump right into the example of the issue I am having:
I want to convert this: "cat@dog%arm@hand%tree@apple..."
into this:
cat | dog
arm | hand
tree| apple
..etc
As in, 2 columns in the spreadsheet, or a 2D array. Isolating the strings using has not been difficult, it is the array manipulation that is stumping me.
Here is one attempt: `
function key_abb(input) {
if(input.map) {
return input.map(key_abb);
}else {
var temp = input.toString();
temp = temp.replace("abbreviated-name=", "");
temp = temp.replace("name=", "");
return temp;
}
}`
input being an input range that is formatted like this:
|abbreviated-name="cat" name="dog" |
|abbreviated-name="arm" name="hand" |...
Unfortunately this is still just returning the two strings within the same column, so the only thing that was accomplished was that the extra text was removed, I am not sure how to create the output array that I would like. Thank you!
.split()method.