I need to get data in javascript array using asp. How to get data and put it in this format in javascript array . This example is of php .
<script>var chartdata=[{"values":[<?php $conn =mysql_connect("host","root","pass") or die ("we couldn't connect!");mysql_select_db("test");$rs = mysql_query("SELECT x1 FROM table") or die(mysql_error());while($row = mysql_fetch_array($rs)){echo $row['x'].',';}?>],}];</script>