---
title: "Send JSON data with jQuery"  
description: "Send JSON data with jQuery"  
author: "Anonymous User"  
published: 2018-03-21  
updated: 2018-03-21  
canonical: https://www.mindstick.com/forum/34445/send-json-data-with-jquery  
category: "jquery"  
tags: ["ajax", "jquery"]  
reading_time: 1 minute  

---

# Send JSON data with jQuery

I want to send [data](https://www.mindstick.com/articles/13050/salesforce-aiming-to-dominate-predictive-analytics-with-data-science) as [Json format](https://www.mindstick.com/forum/158266/what-is-the-json-format) but why this [code](https://yourviews.mindstick.com/view/85458/alan-turing-the-mastermind-behind-cracking-the-enigma-code-during-world-war-ii) [returning](https://www.mindstick.com/news/2477/returning-ceo-bob-iger-dismisses-the-disney-apple-sale-as-pure-speculation) [Name](https://yourviews.mindstick.com/view/87450/how-to-generate-a-brand-name-using-linkedin-comprehensive-guide)=[Mindstick](https://yourviews.mindstick.com/view/84668/how-mindstick-is-used-for-marketing-purposes) City=Allahabad

```
var arr = {Name:'Mindstick', City:Allahabad};
$.ajax(
   {
        url: "Ajax.ashx",
        type: "POST",
        data: arr,
        dataType: 'json',
        async: false,
        success: function(msg) {
            alert(msg);
        }
    }
);
```

can any helpme

## Replies

### Reply by Anonymous User

Try this code

```
var arr = {Name:'Mindstick', City:Allahabad};$.ajax({
    url: 'Ajax.ashx',
    type: 'POST',
    data: JSON.stringify(arr),
    contentType: 'application/json; charset=utf-8',
    dataType: 'json',
    async: false,
    success: function(msg) {
        alert(msg);
    }
});
```

You have not specified contentType


---

Original Source: https://www.mindstick.com/forum/34445/send-json-data-with-jquery

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
