Convert JS arrays to ruby arrays