---
title: "Convert JSON String to Object"  
description: "Convert JSON String to Object"  
author: "Anonymous User"  
published: 2018-03-22  
updated: 2018-03-23  
canonical: https://www.mindstick.com/forum/34446/convert-json-string-to-object  
category: "jquery"  
tags: ["jquery"]  
reading_time: 1 minute  

---

# Convert JSON String to Object

I want to [convert](https://www.mindstick.com/forum/2093/configurationmanager-appsettings-convert-n-to-n-why) [Json](https://www.mindstick.com/forum/34572/php-methods-in-json) [string](https://www.mindstick.com/articles/1527/string-split-in-c-sharp) into [array](https://www.mindstick.com/articles/335/jagged-array-in-c-sharp-dot-net) object.I have a JSON String like this.

{"label1":"[Mindstick](https://yourviews.mindstick.com/view/84668/how-mindstick-is-used-for-marketing-purposes)","label2":"123",}

and I want [result](https://www.mindstick.com/blog/12011/advantages-of-getting-result-oriented-seo-from-an-agency) like this

[{"label1":"Mindstick","label2":"123",}]

\

\

## Replies

### Reply by Anonymous User

This can be done like this ...Try to push that object into an array,

```
var xObj = {"label1":"Mindstick","label2":"123",}
var xArr = [];
xArr.push(xObj);

console.log(JSON.stringify(xArr)); // [{"label1":"Mindstick","label2":"123",}]
```

\

\

\


---

Original Source: https://www.mindstick.com/forum/34446/convert-json-string-to-object

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
