I have a JSON variable that I'm wanting to pass to javascript in a diet template.

:javascript
     var obj=JSON.parse(#{info});

When I load the website and check the page source there, it just copied "#{info}" into the source rather than loading the JSON string from the variable.

So, the source shows:

<script type="application/javascript">
     //<![CDATA[
          var obj=JSON.parse(#{info});
     //]]>
</script>

How can I extract the JSON string from the variable, as the method I use when working with D inside a template appears to function differently within a javascript filter.