in reply to Re^5: reading a JSON object
in thread reading a JSON object
OK, I've tried to look this up myself, but it would take me several hours to figure out what you could write in a few minutes.
There are 108 rows in $json_aoa, with timestamps from
$json_aoa->[0][1]to
$json_aoa->[108][1]How do I modify the following code
for my $ar_jentry (@$json_aoa) { # handle each decoded JSON entry printf $fh_data2 "%s\t%s\t%s\t%s\t%s\t%s\t%s\n", @$ar_jentry; }
so that it only prints values corresponding to the last 10 timestamps, in reverse order (latest to earliest)?
The other columns in the array are urlkey, timestamp, original, mimetype, statuscode, digest, and length.
How do I specify an arbitrary subset of these to include in the print out?
Thanks.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^7: reading a JSON object
by hippo (Archbishop) on May 11, 2022 at 11:01 UTC | |
by anautismobserver (Sexton) on May 11, 2022 at 19:45 UTC | |
by AnomalousMonk (Archbishop) on May 11, 2022 at 22:53 UTC | |
|
Re^7: reading a JSON object -- sort and slicing AoA
by Discipulus (Canon) on May 11, 2022 at 11:12 UTC | |
|
Re^7: reading a JSON object
by AnomalousMonk (Archbishop) on May 11, 2022 at 15:56 UTC |