How to put a variable as a string parameter in google's API data.addRows('string', value)
<p>I want to use a variable as a string parameter in data.AddRows like so...</p>

<pre><code>   function LanguagesChart(Names, Nums) {

        var data = new google.visualization.DataTable();
        data.addColumn('string', 'Language');
        data.addColumn('number', 'Employees');

        for (i = 0; i &lt; Names.length - 1; i++) {
            data.addRows([  [Names[i], Nums[i] ] ]);  //This doesn't work
            data.addRows([  [' ' +Names[i], Nums[i] ] ]);  //This doesn't work
            data.addRows([  ['English', Nums[i] ] ]);   //This works
        }
        var options = { 'title': 'Employees Languages', 'width': 400, 'height': 300 };

        // Instantiate and draw our chart, passing in some options.
        var chart = new google.visualization.PieChart(document.getElementById('LanguageChart'));
        chart.draw(data, options);
    }
</code></pre>

<p>I see what the problem is. Javascrip is not getting a proper array through the parameter list. I'm using asp.net to send these arrays on the Page_Load and I'm getting these values from a database...</p>

<pre><code>      string[] langs = languages.Split(' ');
      string[] Nums = nums.Split(' ');

      string serializedLat = (new JavaScriptSerializer()).Serialize(langs);
      string serializedLong = (new JavaScriptSerializer()).Serialize(Nums);

      ScriptManager.RegisterStartupScript(this, this.GetType(), "LanguagesChart",  "LanguagesChart( " + serializedLat + ", " + serializedLong + ");", true);
</code></pre>

<p>The Nums array works on the js script but the Names array is not, eventhough I tested it with alert(Names[i] + Nums[i])</p>
