lundi 27 février 2017

How can I access this

I'm trying to access some JSON data that I got through an ajax call. I'm not sure how to access this data now though. I want to extract the "test" portion out of the json. Could someone please help me out with this

enter image description here

code sample:

$(".test").on("click", function() {
var dialogID = $(this).attr("id");
console.log(dialogID);
$.ajax({
  type: "GET",
  url: "test.php?id=" + dialogID,
  dataType: "json",
  success: function(data) {
    console.log(data);
  },
  error: function() {
    console.log("error");
  }
});




Aucun commentaire:

Enregistrer un commentaire