1👍
✅
First, I think you want to send a dictionary to simplejson.dumps()
like:
json_dump = simplejson.dumps({'pid': post.id})
Then, in your javascript function, you would get the id with your argument.pid like:
function myCallback(data){
alert(data.pid);
}
Source:stackexchange.com