title: How to convert array into string using jquery
body: <p>I receive data from a table. And save them in array.</p>
  
  <p>I am wondering how to convert array into string with the following format.</p>
  
  <p>In my request,users can add new rows and type in questions and answers.</p>
  
  <p>That's why I think I can put all data in the "form:input"</p>
  
  <p>My code:</p>
  
  <pre><code>var param = [];
  $("#tblPets tbody tr").each(function(index){
  
   param.push({
      question: $("textarea.question", this).val(),
      answer: $("textarea.answer", this).val(),
   });
  
  });
  var json = JSON.stringify(param); 
  
      $("form #queAns").val(json);
  </code></pre>
  
  <p>I can convert this array into JSON string.but the format is not what im looking for.</p>
  
  <p>For example:</p>
  
  <p>I hope my string can look like:<br/></p>
  
  <p>Question,Answer|Question,Answer|Question,Answer|</p>
  
  <p>How to do this?? </p>