summaryrefslogtreecommitdiff
path: root/share/csv2json
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2019-11-18 20:09:07 +0100
committerDaniel Friesel <derf@finalrewind.org>2019-11-18 20:09:07 +0100
commit33ce867b1bd4abb8fc9dde049507937182b9c6e3 (patch)
treeb4d80287b24240cf65e95f0321f48e23eb54233c /share/csv2json
parent00479d5fd29b92f8c48568349f175deac566d4a8 (diff)
csv2json, json2json: Perform consistency checks
Diffstat (limited to 'share/csv2json')
-rwxr-xr-xshare/csv2json4
1 files changed, 2 insertions, 2 deletions
diff --git a/share/csv2json b/share/csv2json
index 9e6340c..2bac49f 100755
--- a/share/csv2json
+++ b/share/csv2json
@@ -50,8 +50,8 @@ for my $line (@csv_lines) {
my $have_duplicates = 0;
my @names = map { $_->{name} } @stations;
-my @ds100 = map { $_->{ds100} } @stations;
-my @uic_ids = map { $_->{uic} } @stations;
+my @ds100 = map { $_->{ds100} } sort { $a->{ds100} cmp $b->{ds100} } @stations;
+my @uic_ids = map { $_->{uic} } sort { $a->{uic} <=> $b->{uic} } @stations;
for my $i ( 1 .. $#names ) {
if ( $names[ $i - 1 ] eq $names[$i] ) {