Don't getting JSON data properly
<p>I am getting this output of json by doing this</p>

<pre><code>$.get('getDataPartySize.php', function(data) {
      alert(data);
});
</code></pre>

<p>Output of this is :</p>

<pre><code>[object Object],[object Object],[object Object],[object Object],[object Object],
[object Object],[object Object],[object Object],[object Object],[object Object],
[object Object],[object Object],[object Object],[object Object],[object Object],
[object Object],[object Object],[object Object],[object Object],[object Object],
[object Object],[object Object],[object Object],[object Object],[object Object],
[object Object],[object Object]
</code></pre>

<p>and I tried ouput of getDataPartySize.php like below and getDataPartySize.php have also this <code>header("Content-type: text/json")</code>;</p>

<pre><code>[{"name":"waqar","size":"3"},{"name":"waqas","size":"8"},{"name":"jahangir","size":"6"},{"name":"wawar","size":"3"},
 {"name":"basit","size":"5"},{"name":"basit","size":"5"},{"name":"Ali","size":"4"},
 {"name":"basit","size":"4"},{"name":"Malik","size":"5"},{"name":"basit","size":"5"},
 {"name":"Kashif","size":"7"},{"name":"test","size":"5"},{"name":"Ch","size":"7"},
 {"name":"first","size":"10"},{"name":"2nd","size":"6"},{"name":"qasim","size":"10"},
 {"name":"saleem","size":"14"},{"name":"testing","size":"16"},
 {"name":"kashif","size":"10"},{"name":"Ch","size":"14"},{"name":"saleem","size":"6"},
 {"name":"new","size":"1"},{"name":"abc","size":"2"},{"name":"lahori","size":"3"},
 {"name":"newpak","size":"1"},{"name":"abc","size":"2"},{"name":"tabaq","size":"6"}
]
</code></pre>

<p>I am using jQuery. I don't know what the problem is.</p>

<p><strong>EDIT:</strong> also tried this, getting same output.</p>

<pre><code>$.getJSON("getDataPartySize.php",function(result){
  alert(result);
}
</code></pre>
