Превратите строку в массив массивов с Object.Entries ()


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