Transforme a string em matriz de matrizes com object.entries ()


 const object1 = "xxxxx";
console.log(Object.entries(object1));
/*creates [[0, "x], [1, "x"], [2, "x"], [3, "x"], [4, "x"]]
Javasper