title: Create object from text
body: <p>I have javascript text:</p>
  
  <pre><code>var textObject = '
  
          {
              news: [
                                                        { 
                  "title":"aaa",
                  "desc":"bbb"
                  },                                      { 
                  "title":"ccc",
                  "desc":"ddd"
                  }          ]
          }; 
  
  '
  </code></pre>
  
  <p>but this is in text in my variable. If i have this in code html this working ok, but i get this data with ajax from PHP script.</p>
  
  <p>So how can i convert/parse this text to object? If i have JSON then i can use JSON.parse(textObject); but this isn't json.</p>