0

I am getting a JSON response from a method called /CategoryResearch/Search but I have to know how can I use that JSON data to inject this data to my HTML table. I am new with AJAX so that's why I can't access the returned data value from the AJAX call. Please check my example code bellow.

$.post("/CategoryResearch/Search", { 
  OperationName: _operationname, 
  calltype: _calltype, 
  keywords: _keywords 
})
.done(function (data) {
  if (data != null) {
    $("#normalState").fadeOut();
    // this "data" contains returned Json. How can i access this?
    var u = data.property.value // something like this way?
}});
Toribio
  • 3,963
  • 3
  • 34
  • 48
John Lk
  • 185
  • 2
  • 15
  • 1
    Try console.log(data) and you will see in your developer toolbar (F12) which values are in it. Normally data.property should return the value. – sics Oct 14 '17 at 17:10
  • something like **$(table).append(data)** ...you gotta extract the tr from the data tho – Rohit Kumar Oct 14 '17 at 17:12
  • First of all print your data as mentionned in the @sics 's comment, then edit your question with the printed text that you'll copy from your console. And finally, we'll see what we can do for you – Mehdi Bouzidi Oct 14 '17 at 17:14

0 Answers0