Thanks for your feedback

Below is my JSON Array

{"dns_zone": {"created_at":"2013-07-08T02:21:57-05:00","id":752,"name" +:"aresstest.com","updated_at":"2013-07-08T02:21:57-05:00","user_id":1 +36, "records":{ "SOA":[{"dns_record":{"expire":2419200,"hostmaster":"ns1.qwkdns.com"," +id":122329,"minimum":10800,"name":"@","primaryNs":"ns1.qwkdns.com","r +efresh":7200,"retry":900,"serial":2013032112,"ttl":86400,"type":"SOA" +}}], "NS":[{"dns_record":{"hostname":"ns1.qwkdns.com","id":122325,"name": +"aresstest.com","ttl":86400,"type":"NS"}},{"dns_record":{"hostname":" +ns2.qwkdns.com","id":122326,"name":"aresstest.com","ttl":86400,"type" +:"NS"}},{"dns_record":{"hostname":"ns3.qwkdns.com","id":122327,"name" +:"aresstest.com","ttl":86400,"type":"NS"}},{"dns_record":{"hostname": +"ns4.qwkdns.com","id":122328,"name":"aresstest.com","ttl":86400,"type +":"NS"}}], "A":[{"dns_record":{"id":122332,"ip":"173.236.102.246","name":"local +host.aresstest.com","ttl":14400,"type":"A"}},{"dns_record":{"id":1223 +33,"ip":"173.236.102.246","name":"ftp","ttl":14400,"type":"A"}},{"dns +_record":{"id":122334,"ip":"173.236.36.138","name":"mail","ttl":14400 +,"type":"A"}},{"dns_record":{"id":122335,"ip":"173.236.102.246","name +":"webmail","ttl":14400,"type":"A"}},{"dns_record":{"id":122337,"ip": +"173.236.36.138","name":"autodiscover","ttl":14400,"type":"A"}}], "CNAME":[{"dns_record":{"hostname":"aresstest.com","id":122336,"name +":"www","ttl":14400,"type":"CNAME"}}], "MX":[{"dns_record":{"hostname":"mail.aresstest.com","id":122330,"na +me":"@","priority":0,"ttl":14400,"type":"MX"}}], "TXT":[{"dns_record":{"id":122331,"name":"@","ttl":14400,"txt":"v=sp +f1 ip4:173.236.102.246 +a +mx +ip4:173.236.36.138 ?all","type":"TXT"} +}] }}}

How to read above array need to below output

my $json = '[{"dns_record":{"ip":"192.64.179.9","ttl":"86400","name":" +@","hostname":"ns1.qwkdns.com.","type":"soa"}}, {"dns_record":{"ip":"aresstest.com.","ttl":"86400","n +ame":"aresstest.com.","hostname":"ns1.qwkdns.com.","type":"ns"}}, {"dns_record":{"ip":"aresstest.com.","ttl":"86400","n +ame":"aresstest.com.","hostname":"ns2.qwkdns.com.","type":"ns"}}, {"dns_record":{"ip":"aresstest.com","ttl":"86400","na +me":"aresstest.com.","hostname":"192.64.179.10","type":"a"}}, {"dns_record":{"ip":"localhost","ttl":"14400","name": +"localhost.aresstest.com.","hostname":"127.0.0.1","type":"a"}}, {"dns_record":{"ip":"aresstest.com.","hostname":"ares +stest.com.","ttl":"14400","name":"14400","type":"mx","mx_priority":"0 +"}}, {"dns_record":{"ip":"mail","ttl":"14400","name":"1440 +0","hostname":"aresstest.com.","type":"cname"}}, {"dns_record":{"ip":"www","ttl":"14400","name":"14400 +","hostname":"aresstest.com.","type":"cname"}}, {"dns_record":{"ip":"ftp","ttl":"14400","name":"14400 +","hostname":"aresstest.com.","type":"cname"}}, {"dns_record":{"txt":"spf1 ip4:173.236.102.246 +a +mx + +ip4:173.236.36.138 ?all","ttl":"14400","name":"14400","hostname":"a +resstest.com.","type":"txt"}} ]';
Awaiting your feedback.

In reply to Re^2: How to read Array by sunilgame
in thread How to read Array by sunilgame

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.