Ruby Parse String Into Array In Javascript