Ruby Split String Into Array Js