I'm using an MVC app and my controller gets a string like this from mongodb:
str = "[{ title: 'My title', items: [{ name: 'item1', link: '#' }, { name: 'item2', link: '#' }] }]"
And I'm trying to use it in the view as a js Array, but I can't find any way to convert it.
Note that the array will have some sub arrays as items and some sub sub arrays, and so on.
Any help? Maybe I have to build the array inside my business layer instead of returning a string?