summaryrefslogtreecommitdiff
path: root/share
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2022-12-03 21:51:02 +0100
committerDaniel Friesel <derf@finalrewind.org>2022-12-03 21:51:02 +0100
commit2a316b36cc43c221df0d871b5ce3f94d4e1751a8 (patch)
tree10c969dca154c54a6fe09f58742f304969153c1e /share
parentdb9817329e3bfb53075414bab1263f9504820592 (diff)
json2json: sort by name first, EVA ID second
Diffstat (limited to 'share')
-rwxr-xr-xshare/json2json3
1 files changed, 2 insertions, 1 deletions
diff --git a/share/json2json b/share/json2json
index 47cb83d..b559d1b 100755
--- a/share/json2json
+++ b/share/json2json
@@ -9,7 +9,8 @@ use JSON;
my $json_str = read_file('stations.json');
my $stations = JSON->new->utf8->decode($json_str);
-@{$stations} = sort { $a->{name} cmp $b->{name} } @{$stations};
+@{$stations}
+ = sort { $a->{name} cmp $b->{name} or $a->{eva} <=> $b->{eva} } @{$stations};
my $have_duplicates = 0;
my @names = map { $_->{name} } @{$stations};