I want to pass viewbag - keyvaluepair data to javascript code.
I tried code below;
<script type="text/javascript">
@foreach (var jtcontentInfo in (List<KeyValuePair<string, string>>)ViewBag.JumpToContentInfo)
{
var someStringValue = @jtcontentInfo.Key; // It works but I cant read it from javascript.
}
</script>
What is the best way of handling? Any help will be greatly appreciated.