I am currently trying to put the results of an AJAX GET request into a table for an app under development in PhoneGap. However I keep receiving the error below and can't seen to figure out why.

> 
> TypeError: e is null
> 
> 
> 

The result of the ajax is as follows: 

```
[{ 
    name: "test1"
},{ 
    name: "test2"
}]

```

The code going with it is:

```js
function getMatches() {
    $.ajax({
        type: 'GET',
        dataType: "json",
        url: 'url',
        success: function(result){
            console.log(result);
            var jsonObj = $.parseJSON(result);
            var html = '<table>';
            $.each(jsonObj, function(key, value){
                html += '<tr>';
                html += '<td>' + key + '</td>';
                html += '<td>' + value + '</td>';
                html += '</tr>';
            });
            html += '</table>';
            $( "div#results" ).replaceWith(html);
        },
        error: function(){
            console.log(result);
            alert('There was an error making getting your offers');
        }
    });
}

```