Below is the code I am working on, my goal is to convert string to an actual object and just simply display the data from ajax call. But it seems that the string value cant work this way.
var string = "first: 'George', last: 'Smith'";
$.ajax({
type: 'POST',
url: 'ajax.php',
data: {string}
}).done(data){
alert(data);
}