This is my script, which I manged to put together using code on this link : Setting up a variable length two-dimensional array
stringWithSeper = "Panther^Pink,Green,Yellow|Dog^Hot,Top";
var blocks = stringWithSeper.split("|");
for (var i = 0; i < blocks.length; i++) {
temp = blocks[i].split("^");
result[temp[0]] = temp[1].split(",");
}
I'm confused. What's the structure of "result" ? Is it
result = {"Panther":{"Pink","Green","Yellow"}, "Dog":{"Hot","Top"}}
If not, what is it? I've been breaking my head over this for the past 3 days.