This was something that I struggled with, and found the answer on stackoverflow, so I thought I should share it.
This is Jquery syntax.
$.ajax({
url: 'AjaxPHPScript.php'
type: 'POST',
data: "chartdata="+chartdata, // this is what I pass to the Ajax call
success: function(result) {
// this is when it comes back from Ajax
// this will NOT work
$("#"+contentdiv).highcharts(result);
// this will
// the parentheses around the JSON results inside the eval function is the key!
var chartstuff=eval("("+result+")");
$("#"+contentdiv).highcharts(chartstuff);
// I did not discover this on my own, I got the lead from this post:
// http://stackoverflow.com/questions/13718326/javascript-string-to-object
},
error: function(e) {
console.log(e);
console.log(JSON.stringify(e));
}
});