Whats the way to manually access the firt element of this arrays without looping?
Test Code:
Thanks for looking!#!/usr/bin/env perl use strict; use warnings; my $DATA = { "facts": [ { "name": "A", "type": "Normal" }, { "name": "B", "type": "Broken" } ], }; print $DATA->{ facts }->{ name }->[0]; # A print $DATA->{ facts }->{ type }->[0]; # Normal exit;
In reply to Get element of array not looping. by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |