var jsonString = '{"x": {"y": [2,3]}, "t": [3,5]}';
var obj = JSON.parse(jsonString);
var arr = [];
arr.push(obj.x.y)
arr.push(obj.t)
console.log(arr);
I was wondering the same thing when I was working on https://www.slotozilla.com/free-slots/silver-lion .Don't create your json yourself, most languages have functions to turn your object/array into a valid json, so just create your object as you normally do and then use that function as in Javascript JSON.stringify().