I want to parse json , but unsuccessful. Can any one check my code
<p>I created a php page which print this from the database</p>

<pre><code>[{"sha_id":"2","sha_text":"This is 1st sha."},{"sha_id":"4","sha_text":"this is 2nd sha"}]
</code></pre>

<p>now i want to extract each variable out of this.. after googling for a while i got this</p>

<pre><code>$(document).ready(function(){
    var output = $('#output');

    $.ajax({

        url: 'http://xxxx.com/android_sha/index.php',
        dataType: 'jsonp',
        jsonp: 'jsoncallback',
        timeout: 5000,
        success: function(data, status){
            $.each(data, function(i,item){
                var landmark = '&lt;h1&gt;'+item.sha_id+'&lt;/h1&gt;'
                + item.sha_id+'&lt;/p&gt;';

                output.append(landmark);
            });
        },
        error: function(){
            output.text('There was an error loading the data.');
                alert("error");         
        }
    });
});
</code></pre>

<p>but it always alert error for me. I could be something wrong at <code>$.each(data, function(i,item){</code> but can't figure out what should be the correct format.</p>
