title: Thymeleaf print JSON string as JSON object into a javascript variable
body: <p><strong>In Specific</strong></p>
  
  <p>I need a way to print <code>JSON</code> representation of a string value into the html page via thymeleaf.</p>
  
  <p><strong>In detail</strong></p>
  
  <p>I'm having a <code>model attribute</code> which contains a string which is actually a string representation of the <code>JSON</code></p>
  
  <p>My <code>thymeleaf</code> code </p>
  
  <pre><code>&lt;script th:inline="javascript"&gt;
    var value = [[${data.scriptValue}]];
  &lt;/script&gt;
  </code></pre>
  
  <p>print the variable as below</p>
  
  <pre><code>var value = '[[\"asd\",\"3\"],[\"asd\",\"1\"],[\"asdasd\",\"1\"]]';
  </code></pre>
  
  <p>But I want something like this as a <code>javascript/JSON</code> array</p>
  
  <pre><code>var value = [["asd","3"],["asd","1"],["asdasd","1"]];
  </code></pre>
  
  <p>How to do this in thymeleaf?</p>
  
  <p><hr/>
  <em>Note: I know I can do this from <code>JSON.Parse</code> but i need a way to do this from thymeleaf :)</em></p>