title: when i use dataType json it shows elment ] is missing in my ajax script
body: <p>trying to use datatype json to get the value in json format but when i add  it into my script it shows error that elemet ] is missing what am i doing wrong?</p>
  
  <pre><code>    $(document).ready(function(){
      $(window).scroll(function(){
  
          var lastID = $('.load-more').attr('lastID');
  
          if ($(window).scrollTop() == $(document).height() - $(window).height() &amp;&amp; lastID != 0){
              $.ajax({
                  type:'POST',
  
                  url:'&lt;?php echo base_url("user/get_all_post"); ?&gt;',
                  data:"id="+lastID,
                  dataType:'json',
  
                  beforeSend:function(html){
                      $('.load-more').show();
                  },
                  success:function(html){
  
                   //alert(html);
                   var ParsedObject = JSON.stringify(html);            
                var json = $.parseJSON(ParsedObject);
                //alert(json);
              /*
                var json =" [{'id':1,'name':'Test1'},{'id':2,'name':'Test2'}]";
                var jsonArray = eval('(' + json + ')');
              for (i in jsonArray)
              {
               alert(jsonArray[i]["name"]);
              }
              */
               // alert(json.id);
                var jsonArray = eval('(' + json + ')');
  
               $PostId=jsonArray[4]["id"];
             // alert($PostId);
  
              for(i in jsonArray)
              {
              $post_status=jsonArray[i]["status"];
              $status_image=jsonArray[i]["status_image"];
              $multimage=jsonArray[i]["multimage"];
  
                //alert(Lastid);
  
                //alert($post_status);
                //alert($status_image);
                //alert($multimage);
  
                    $('.load-more').attr('lastID',$PostId);
                    $('#result_table').append(jsonArray);
  
                       }
                   } 
              });
          }
      });
  });
  &lt;/script&gt;
  </code></pre>
  
  <p>i want to access my json data so that i can display it but all the variable shows undefined when i access then in my view</p>