i have to parsing json data get from $post method
$.post( "vehicle_route_qry.php",function(data) {
siteshistory = $.parseJSON(data);
siteshistory.shift();
draw_route(siteshistory);
$("#dev_det_spin").hide();
});
my php file
$myJSON = '{ "name":"John", "age":31, "city":"New York" }';
echo json_encode($myJSON);
i am getting json properly in my response but getting this issue
siteshistory.shift is not a function
i have loaded following js files
<script src="js/function.js"></script>
<script src="js/jquery.min.js"></script>
<script src="https://developers.google.com/maps/documentation/javascript/examples/markerclusterer/markerclusterer.js">
</script>
<script src="https://maps.googleapis.com/maps/api/js?key=AIzaSyDaL0ieAkLhzy1rDoLifajeowdXPwTvzmI"></script>
<!-- <script type="text/javascript" src="js/date.js"></script> -->
<script type="text/javascript" src="js/loader.js"></script>
<script type="text/javascript" src="js/header_function.js"></script>
but shift function for $.parseJSON(data).shift() is not working i am not able to find any reference regarding shift function
suggestion would be helpful