Ruby Parse String Into Array Javascript Appendchild W3schools