NOTE:- I am just beginning with JSON with javascript and was trying this simple script. I want to make use of JSON.parse() here to fetch the data
Here is a snippet of my code
<html>
<body>
  <div id="output"></div>
</body>
<script>
  var text = "'college':{'stream':{'commerce':{'junior':['FY','SY'],'bachelor':['Bcom','BMM']},'science':{'junior':['FY','SY'],'bachelor':['Bsc','BTech']},'arts':{'junior':['FY','SY'],'bachelor':['BA','B.Ed']},}}";
  var jcontent = JSON.parse(text);
  document.getElementById('output').innerHTML += jcontent;
</script>
</html>Nothing is getting displayed. I don't understand what is the problem. Can anyone help? Edit- I corrected the string which spanned multiple lines but it still doesn't work
 
     
    