in reply to Re: JSON and Perl Objects - How to access data?
in thread JSON and Perl Objects - How to access data?
So how would you take the next step and represent this data in perl. For instance, if at the end of all this I want
@name to hold 'Theodor Nelson','Morton Heilig' ,and
@id to hold '_333301','_13204'
how would I do that? I tried
my @names = @{ $inventors_array[1]->{"name"} };
but that gives me
I'm not trying to define $names[Morton Heilig] = something, I'm trying to define $names[1]=Morton Heiling, or alternatively $names{_13204} = 'Morton Heilig'Can't use string ("Morton Heilig") as an ARRAY ref while "strict refs" + in use
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^3: JSON and Perl Objects - How to access data?
by 1nickt (Canon) on Sep 05, 2015 at 17:40 UTC | |
by Anonymous Monk on Sep 06, 2015 at 04:35 UTC | |
by AnomalousMonk (Archbishop) on Sep 06, 2015 at 13:04 UTC | |
by Anonymous Monk on May 25, 2018 at 00:37 UTC | |
Re^3: JSON and Perl Objects - How to access data?
by poj (Abbot) on Sep 05, 2015 at 16:39 UTC |
In Section
Seekers of Perl Wisdom