title: I need to convert a Json file into a readable csv
body: <p>I got this Perl code that is supposed to read my categories and put them into a csv file. After many tries i finally got it but is only ready 50 of my over 500 categories. Any way to modify this routine to read all my categories. </p>
  
  <p>Here is the Perl file I got from the Bigcommerce forum.</p>
  
  <pre><code>use strict;
  use JSON::PP;
  
  open (my $fh, "&lt;", 'categories.json');
  my $json_text = &lt;$fh&gt;;
  my $perl_scalar = decode_json($json_text);
  
  
  # Make a list of ids to names, so that I can build a content path for Neto    category CSV
  
  my $id;
  foreach my $element (@$perl_scalar)
  {
           $id-&gt;{$element-&gt;{id}}=$element-&gt;{name};
  }
  
  # Actually print out the CSV content, in Neto's required format.
  
  
  
  print "content type,content path,name,description 1,description 2,sort order,seo meta description,seo page title,seo meta keywords\n";
  
   foreach my $element (@$perl_scalar)
  {
         print "Product Category,";
         my $parent_category = $element-&gt;{parent_category_list}[0];
         if ($parent_category == $element-&gt;{id})
         {
              print ",";
          }
         else
         {
              print $id-&gt;{$parent_category}, ",";
          }
         print $element-&gt;{name}, ",", $element-&gt;{description}, ",,", $element-&gt;{sort_order}, ",", $element-&gt;{meta_description}, ",,\n";
          } 
  </code></pre>
  
  <p>Thanks in advance</p>