title: Passing arrays in JSON to javascript
body: <p>I did a search on stackoverflow and did not find the exact thing that I am looking for.</p>
  
  <p>I am using an in-house server side language, like PHP. I have two drop downs A and B on a web page. B gets populated with values from database based on the input from A. Simple problem right? So I fire an onchange even on A and call a javascript function, which does a post Ajax call to the server side code. This server side code should do the query and return the results to a responseHandler which should give the results as post data to B. The problem I am having is in the server side code, when I do the query I get a bunch of rows as array. How do I pass that array to the Javascript responseHandler ? I am trying to send is JSON but not with much success. Below is the server side code:</p>
  
  <pre><code>// If - then - else , !, query, and get are functions in the language
  {if {! {query output post get_data_qry_str}}{then
      //JSON object
     {
        "status":"error",
        "errorMessage":"Query did not succeed"
     }
  }{else
     //JSON Object
     {
        "status":"success",
        "successMessage":"how do I pass output here ?"
     }
  }}
  
  output.values={1,2,3}
  </code></pre>
  
  <p>If I say {get output} it passes "", if I say {get output.values} it passes 1.
  Let me know if I should post more clarity on the syntax of the server side language.</p>