Question: i'm using jquery.getJson() to retrieve a json object created by my php script.

it works if i remove the locations array. however i need the locations array to populate a combobox.

my formatted json is below. any suggestions how i can get this to work with one json query instead of 2.

```
{ "ContactID" : "1", "CustomerID" : "1", "FirstName" : "john", "LastName" : "smith", "Position" : "General Manager", "ContactNumber" : "234523455", "FaxNumber" : "235235234", "LocationSelected" : "1", "Default" : "default", locations : {0 : { "addressID" : "1" , "description" : "Street Address" }}}

```

i also tried it like this

```
{ "ContactID" : "1", "CustomerID" : "1", "FirstName" : "john", "LastName" : "smith", "Position" : "General Manager", "ContactNumber" : "234523455", "FaxNumber" : "235235234", "LocationSelected" : "1", "Default" : "default", locations : [{ "addressID" : "1" , "description" : "Street Address" }]}

```

Answer: 
I found a few PHP/Javascript solutions that show datagrids of MySQL tables:

**jqGrid** is a grid component for ASP.NET & PHP, that supports row editing, sorting, paging, searching and even nested grids!

[site](http://www.trirand.net/default.aspx)

* Client-side javascript based on jQuery
* Theming based on jQuery UI (Themeroller)
* Support for all major databases (MS SQL, MySQL, PostgreSQL)

**SlickGrid** is an unlimited-scrolling grid component that supports sorting, and editors per column type, such as Checkboxes, Dates, Progress bars, etc.

[blog entry](http://blogfreakz.com/javascript/slickgrid-fast-rendering-javascript-gridspreadsheet-component/)

**Ext.ux.Livegrid** is a grid component that connects to a database backend and renders large sets of data into a grid, without the need of paging.

[site](http://www.ext-livegrid.com/)
I have tried several different datagrid solutions, but I found them all somewhat cumbersome to work with. So I created an open source project that very easily converts ***any*** MySQL SELECT statement into a searchable, sortable, paginated datagrid: <http://mysqlgrid.com> or on Github: <https://github.com/escalibore/mySqlGrid> 

I hope you find it useful!