in reply to Re^2: parse json data with underscore symbol
in thread parse json data with underscore symbol

Array indices are zero-based. The "ge" key is in the first element (i.e. index 0). So:

$decoded->{_embded}{stes}[1]{ge} # BAD $decoded->{_embded}{stes}[0]{ge} # GOOD $decoded->{_embded}{ries}[1]{te} # BAD $decoded->{_embded}{ries}[0]{te} # GOOD

By the way, "Use of uninitialized value ..." is a warning, not an error. See "perldiag - Perl diagnostic messages" for a description of this warning.

— Ken

Replies are listed 'Best First'.
Re^4: parse json data with underscore symbol
by amaa11 (Initiate) on Aug 19, 2018 at 09:05 UTC
    Dear kcott, Thanks a lot for providing me these info. Just imagine that I have a very long of the data (Json) as i posted in the post. And I wand print all what I want by a loop to parse all the data. Can you suggest any module or way to do that?? Regards
Re^4: parse json data with underscore symbol
by ikegami (Patriarch) on Aug 20, 2018 at 16:10 UTC

    is a warning, not an error.

    It's still an error, just not an (immediately) fatal one.

Re^4: parse json data with underscore symbol
by amaa11 (Initiate) on Aug 18, 2018 at 11:55 UTC
    Thanks a lot, it is really useful.