I have ViewBag.Result
with string value "[['Garreth','VP'],['Johan','IT'],['Test','QA']]"
I want to convert it as javascript array
var dataset =
[
['Garreth','VP'],
['Johan','IT'],
['Test','QA']
]
Obviously var dataset = '@ViewBag.Result'
doesn't work because javascript treat is as string but not array. Any idea how to do this?
Thanks