title: print JSON objects using perl
body: <p>I am new to perl and i had written below snippet of code to get the JSON objects from the data. But the input data has both hashes and arrays, So how do i get those values for "id" which is an array ?</p>
  
  <pre><code>  use strict;
    use warnings;
    use Data::Dumper;
    use JSON
  
   my $data = '{"total":325,"id": [78,234,737,1253,1459,1733,2166,2653,2855,3133,3414,3538,3729,3905,3991,4110,4160,4536,4692,4701]}';
  
   print Dumper($data);
   my @hash_ref = from_json($data);
  
   foreach my $hash_scalar (@hash_ref) {
  
      foreach (keys %{$hash_scalar}) {
          print "$_ =&gt; ${$hash_scalar}{$_}\n";
          }
      }
  </code></pre>
  
  <p>Output Getting</p>
  
  #
  
  <pre><code>$VAR1 = '{"total":325,"id": 
  [78,234,737,1253,1459,1733,2166,2653,2855,3133,3414,3538,3729,3905,3991,4110,4160,4536,4692,4701]}';
  id =&gt; ARRAY(0x2afee4c)
  total =&gt; 325
  </code></pre>