<?php
$arr = [1,2,3,5,6];
$json = json_encode ( $arr, JSON_FORCE_OBJECT );
?>
<script src="http://code.jquery.com/jquery.min.js" type="text/javascript"></script>
<script type="text/javascript">
var json = jQuery.parseJSON ("<?php echo $json; ?>" );
</script>