I am trying to get data from an object. I tried to get the data as a.doc._id as below.
function ab(data){alert("content is "+data.doc.id);}
You probably need to access the property using the square brackets. Try it -
alert("sdf" + data["doc._id"]);
"doc" is not an object, as shown in the inspector, you must rename the property name to something like doc-title.
Otherwise, you must create an object similar to this
var data = { "act" : "", "doc": { "_id" : "9", "title": "fghfgh" } };