JQuery Post don't work json data type
<p>i have this code in javascript:</p>

<pre><code>$.post('AccessDB.php', {add:add, seriesid:seriesid, lang:lang}, function(data) {
            alert(data);

            if (data.returned == "Verified"){

                notification('Success notification');
            } else if (data.returned == "NotVerified") {

            notification('Oh noes! Something went wrong', true);

            }
        }, "json");
</code></pre>

<p>that I call when I press a button, and then in the <code>AccessDB.php</code> I do this to return the value:</p>

<pre><code>echo json_encode(array('returned' =&gt; 'Error'));
</code></pre>

<p>but the alert that return from javascript is this:</p>

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

<p>and is not the value Error, instead if I delete the <code>"json"</code> from javascript the value in the alert is: </p>

<pre><code>{"returned":"Error"}
</code></pre>

<p>but I can't handle this value because I delete the json datatype, anyone can tell me how I can fix it?</p>
