Answers for "jquery ajax example json data"

3

how to set json type jquery ajax

$.ajax({
    type: "POST",
    contentType: "application/json",
    url: 'http://localhost:16329/Hello',
    data: { name: 'norm' },
    dataType: "json"
});
Posted by: Guest on June-30-2020
-1

How to pass json format data on ajax call

BY LOVE

1- Pass the JSON format data in this way
data: { "str1": "Love", "str2": "Singh" }
2- You can use JSON.Stringfy function also
var employee = { Id: 101, Name: "Love singh" };  
data: JSON.stringify(employee)
Posted by: Guest on July-08-2020

Code answers related to "jquery ajax example json data"

Code answers related to "Javascript"

Browse Popular Code Answers by Language