Hi,

In a Javascript script I am running an AJAX request:

Code:
    $.ajax({url:"goxrequest.php",datatype: JSON,success:function(result){

      $("div").html(result);
    }});
Goxrequest.php looks like this:

Code:
  include("gox_query.php");
  $result = gox_query();
  print json_encode($result);
where goxrequest gives an output like this:

{"result":"success","data":{"last_local":{"value":"112.24000","value_int":"11224000","display":"$112 .24","display_short":"$112.24","currency":"USD"},"last":{"value":"112.24000","value_int":"11224000", "display":"$112.24","display_short":"$112.24","currency":"USD"},"last_orig":{"value":"112.24000","va lue_int":"11224000","display":"$112.24","display_short":"$112.24","currency":"USD"},"last_all":{"val ue":"112.24000","value_int":"11224000","display":"$112.24","display_short":"$112.24","currency":"USD "},"buy":{"value":"112.15001","value_int":"11215001","display":"$112.15","display_short":"$112.15"," currency":"USD"},"sell":{"value":"112.24000","value_int":"11224000","display":"$112.24","display_sho rt":"$112.24","currency":"USD"},"now":"1368120870276453"}}

Now, the question is, how I can interpret this in the initial Javascript from which I run the AJAX query? Basically, I'd like to make an array out of it again, so that when I use output["result"] it gives back "success", etc... How do I do this?