I want to convert a string:
TWENTY,60,TEN,20
in to this array:
[["TWENTY", 60], ["TEN", 20]]
The string is saved in a variable, which is declared this way:
var result = {status:"", change:[]};
and values are pushed in it this way:
result.status = "OPEN";
result.change.push("TWENTY");
result.change.push(60);
result.change.push("TEN");
result.change.push(20);
As an overall goal, it is required to return the value this way:
{status: "OPEN", change: [["TWENTY", 60], ["TEN", 20]]}
How to do that? Please guide.