const move = 3;
const movetime = ["a", "1", "c"];
const leftarr = ["b", "b", "c"];
const rightarr = ["b", "b", "r"];
const uparr = ["a", "3", "x"];
const downarr = ["a", "b", "o"];
const jsonmove = [];
for (let j = 0; j < move; j++) {
jsonmove.push({
ID: j,
data: [
{
second: movetime[j],
left: leftarr[j],
right: rightarr[j],
up: uparr[j],
down: downarr[j],
},
],
});
}
const datamove = JSON.stringify(jsonmove, null, 2);