diff options
Diffstat (limited to 'bin/db-zugbildung-to-json')
-rwxr-xr-x | bin/db-zugbildung-to-json | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/bin/db-zugbildung-to-json b/bin/db-zugbildung-to-json index c00b784..759f2f7 100755 --- a/bin/db-zugbildung-to-json +++ b/bin/db-zugbildung-to-json @@ -440,6 +440,14 @@ for my $train ( values %map ) { end => $end, postEnd => $post_end, }; + + for my $k ( keys %{ $train->{route} } ) { + if ( not defined $train->{route}{$k} ) { + + # avoid null values (leave out the property instead) + delete $train->{route}{$k}; + } + } } for my $train ( values %map ) { |