Handling php array or variable inside javascript directly using json_encode, will result some value null.
To check null using jquery in this case:
parse php multidimensional array var operators = $.parseJSON('<?php echo json_encode($operators);?>'); //example check for null if( operator[0].last_name !== null ){ lastName = operator.last_name; }
What do you think?