How to send JSON data with request in Ajax?

Solution

You can use $.ajax() jQuery method to send JSON data as shown below

var data = {
             "name":"Amit", 
             "company":"Modern Pathshala"
} $.ajax({ dataType: "json", url: url, data: data, success: success });

Share this thread

Comments

Comments
comments powered by Disqus

Navigation

Social Media