$.ajax({
url: 'script.jsp',
data: {data: value},
type: 'POST',
dataType: 'JSON' // ADD THIS TO GET jQuery TO PARSE JSON RETURN
}).then(response) {
// response is now a parsed JS Object
});
Or$.post('script.jsp',{data: value}, function(response) {
},
'JSON' // ADD THE 4th PARAMETER TO GET jQuery TO PARSE JSON RETURN
)