Hello Perl monks, I have below json data and i would like to print only preview_sandbox_1_link in my excel field. I would like to inform that i will have 1000 entries with different applinks key information.

[ { "visio": { "Launch": false, "hide": { "iOS": true, }, "appLinks": { "preview_sandbox_1_link": true } }, } ]

I have iterate above json data by below code and was able to to capture following "preview_sandbox_1_link": true but unable to print the key "preview_sandbox_1_link" Please check my below code let me know the reason i was not able to print the key value.

use strict; use warnings; use Win32::Process; use REST::Client; use JSON::Parse ':all'; use MIME::Base64; use Term::ReadKey; use Data::Dumper; use MIME::Lite; use Net::SMTP; use Spreadsheet::XLSX; use Spreadsheet::ParseXLSX; for my $i (0..$#responsetextall) { for my $j (0..$#{$responsetextall[$i]}) { $responseapplinks = $responsetextall[$i][$j]{visio{appLi +nks}}; $worksheet->write(0, 1, 'Visio-appLinks' , $my_format); $worksheet->write($r, 15, $responsetextall[$i][$j]{visio}{a +ppLinks}); } }

In reply to Need to get the key information from key and value pair by chandantul

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.