[dalfa@b4sh ~]$
Usuario Linux. Santa Ana. El Salvador.
Mostrando entradas con la etiqueta
sort
.
Mostrar todas las entradas
Mostrando entradas con la etiqueta
sort
.
Mostrar todas las entradas
2019/02/13
Ordenar un array con otro array
new_order = ['ARENA-PCN-PDC-DS', 'ARENA', 'DS', 'FMLN', 'GANA', 'PCN', 'PDC', 'TOTAL ARENA-PCN-PDC-DS', 'VAMOS', 'ABSTENCIONES', 'FALTANTES', 'IMPUGNADOS', 'INUTILIZADAS', 'NULOS', 'SOBRANTES']
votos.sort_by { |a| new_order.index(a[0]) }
Entradas antiguas
Inicio
Suscribirse a:
Entradas (Atom)