TypeError: e is null error
<p>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.</p>

<blockquote>
  <p>TypeError: e is null</p>
</blockquote>

<p>The result of the ajax is as follows: </p>

<pre><code>[{ 
    name: "test1"
},{ 
    name: "test2"
}]
</code></pre>

<p>The code going with it is:</p>

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