title: Convert JavaScript variable string to JSON using JavaScript
body: <p>I have a string in JavaScript I want to make some kind of <code>JSON</code> of key value pair. Here is string </p>
  
  <pre><code> {
      "questionId": null,
      "articleId": null,
      "questionText": "eewrr",
      "pollType": null,
      "selectedOptionIds": [],
      "pollOptionList": [{
          "optionId": 0,
          "questionId": 0,
          "optionText": "werwer",
          "selectedByUser": "N",
          "createdDate": null,
          "modifiedDate": null
      }, {
          "optionId": 0,
          "questionId": 0,
          "optionText": "werwer",
          "selectedByUser": "N",
          "createdDate": null,
          "modifiedDate": null
      }, {
          "optionId": 0,
          "questionId": 0,
          "optionText": "werwer",
          "selectedByUser": "N",
          "createdDate": null,
          "modifiedDate": null
      }, {
          "optionId": 0,
          "questionId": 0,
          "optionText": "werwe",
          "selectedByUser": "N",
          "createdDate": null,
          "modifiedDate": null
      }, {
          "optionId": 0,
          "questionId": 0,
          "optionText": "rwer",
          "selectedByUser": "N",
          "createdDate": null,
          "modifiedDate": null
      }],
      "pollId": 37
  }
  </code></pre>