javascript get array from string