In my php file I have:
$arr[] = array("status"=>0);
echo json_encode($arr);
In my javascript, I have:
$(document).ready(function(){
initialize();
$("#searchbutton").click(function(){
var usrinput = $("#userinput").val();
$.get(
"searchpageajaxjson.php",
{searchterm: usrinput},
function(data){
searchreturned(data);
},
"json"
);
});
});
function searchreturned(data){
console.log(data);
var parsed = jQuery.parseJSON(data);
console.log(parsed);
//for (var i = 0; i < parsed.length; i++) {
// alert(parsed[i]);
// }
//
}
The console.log(data) shows [object Obejct] and console.log(parsed) shows null
Where am I going wrong?
Edited to Add:
alert(data.status) shows undefined.
Second Edit:
I'm really grateful for all the help I've received. It's hard to pick an answer, because I'm really only able to move on from this problem due to all the help received in all the comments. I am always in awe of you kind folks who give your time to helping newbies like myself.

$.as the jQuery identifier and then tojQuery.- any reason?$.parseJSONwould have worked too...