title: How to store a string value in mongo db as an json object?
body: <p>I am getting the data from the UI as follows, all the below input data are strings.</p>
  
  <p>cust_id : temp001
  cust_chart_id : testing
  default_chart : false
  chart_pref_json : {range:6m,chart_type:candlestick,indicators:{},period:Daily,futurepadding:20} }</p>
  
  <p>I am trying to store chart_pref_json in mongodb. This chart_pref_json object is actually stored in db as a string below,</p>
  
  <pre><code>{ "_id" : ObjectId("50aca4caf5d0b0e4d31ef239"), "cust_id" : "temp001", "cust_chart_id" : "testing", "default_chart" : "false", "created_at" : NumberLong("1353491658551"), **"chart_pref_json" : "{range:6m,chart_type:candlestick,indicators:{},period:Daily,futurepadding:20}" }**
  </code></pre>
  
  <p>But i actually want this chart_pref_json to be stored as an json object as below.</p>
  
  <pre><code>{ "_id" : ObjectId("50aca4caf5d0b0e4d31ef239"), "cust_id" : "temp001", "cust_chart_id" : "testing", "default_chart" : "false", "created_at" : NumberLong("1353491658551"), **"chart_pref_json" : {range:6m,chart_type:candlestick,indicators:{},period:Daily,futurepadding:20} }**
  </code></pre>
  
  <p>Can any one help me out on this issue.</p>