title: output json data dynamically from perl cgi
body: <p>I have a simple perl cgi that i use in my extjs project, written like this : </p>
  
  <pre><code>use JSON;
  
  print "Content-type: application/json\n\n";
  
  my $node_hash = {
  data =&gt; [{
       "Week",1145,
           "Sev_Logged", "3_major"
  },{
      "Week", 1146,
          "Sev_Logged", "4_minor"
  }]};
  print to_json($node_hash);
  </code></pre>
  
  <p>Which returns data written in json format that i use to generate a chart.
  I also have a form which contains a combobox with values : "3_major" and "4_minor" corresponding to the "Sev_Logged" field.
  Now what i want is, whenever the user chooses "4_minor", my perl cgi will only return week 1146, thus my chart will only contain data of week 1146.</p>
  
  <p>Is this possible? How?
  Thank you</p>