---
title: "Convert a string written in JSON format, into a JavaScript object"  
description: "Convert a string written in JSON format, into a JavaScript object"  
author: "Anonymous User"  
published: 2018-04-15  
updated: 2018-04-15  
canonical: https://www.mindstick.com/forum/34468/convert-a-string-written-in-json-format-into-a-javascript-object  
category: "jquery"  
tags: ["jquery"]  
reading_time: 1 minute  

---

# Convert a string written in JSON format, into a JavaScript object

[Convert](https://www.mindstick.com/forum/2093/configurationmanager-appsettings-convert-n-to-n-why) a [string](https://www.mindstick.com/articles/1527/string-split-in-c-sharp) written in [JSON format](https://www.mindstick.com/forum/158266/what-is-the-json-format), into a [JavaScript](https://www.mindstick.com/articles/874/how-to-create-watermark-text-for-textbox-by-using-javascript) object.

I want to get [name](https://yourviews.mindstick.com/view/87450/how-to-generate-a-brand-name-using-linkedin-comprehensive-guide) from [var](https://www.mindstick.com/forum/33920/what-is-different-var-and-dynamic-types-in-c-sharp)

```
<script>
var var = '{ "name":"Mindstick", "age":31, "city":"Allahabad" }';
</script>
```


---

Original Source: https://www.mindstick.com/forum/34468/convert-a-string-written-in-json-format-into-a-javascript-object

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
