Skip to content
Snippets Groups Projects
Commit bbc0e917 authored by Paolino Paperino's avatar Paolino Paperino
Browse files

2017-10-20: FG; Fixed first iteration in script.

parent 840f23e1
No related branches found
No related tags found
No related merge requests found
......@@ -226,12 +226,14 @@ foreach my $aKey2 (sort {$a<=>$b} keys %finalHash) {
}
my $_count = 0;
my $firstIter = 1;
# Present the data in JSON format?
my $outJson = "{\n";
$outJson .= "\t\"data\":[\n\n";
foreach my $key (sort keys %finalHash) {
# Print the data in JSON
$outJson .= "\t,\n" if ($doJson && $_count);
$outJson .= "\t,\n" if ($doJson && not $firstIter);
$firstIter = 0;
my $thisCount = scalar @{$finalHash{$key}};
$_count += $thisCount;
if ($doJson) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment