title: strip null values of json object
body: <p>All my AJAX requests are in json format which are being parsed in javascript.</p>
  
  <p>How can i prevent null values being displayed in an HTML page without needing to write an if-statement in javascript for each json value? </p>
  
  <p>Or should i write a custom PHP function to encode an array to json instead of using json_encode() so it doesn't display 'null' ?</p>