title: Replace null with empty string (RestAPI object)
body: <p>The code below generates a table with the data retrieved from the AJAX call. Value &quot;null&quot; is presented across the table when a value isnt present in the JSON object. I would like to replace null with an empty string across the table.</p>
  <pre><code>$(function() {
      var requestUri = &quot;SPO_SITE/_api/web/lists/GetByTitle('LIST_NAME')/items?$select=Title,Order0,Designation,Name,Landline,Mobile,email,Remarks,Department/ID,Department/Title&amp;$expand=AttachmentFiles,Department&amp;$filter=Department/Title%20eq%20%27&quot;+filterTitle+&quot;%27&quot;;
      $.ajax({
          url: requestUri,
          type: &quot;GET&quot;,
          headers: {
              &quot;accept&quot;: &quot;application/json; odata=verbose&quot;
          },
          success: onSuccess,
      });
      function onSuccess(data) {
          var objItems = data.d.results;
          var tableContent = '&lt;table id=&quot;contactsTable&quot;&gt;&lt;thead class=&quot;thead-light&quot;&gt;&lt;tr&gt;&lt;th&gt;Designation&lt;/th&gt;&lt;th&gt;Name&lt;/th&gt;&lt;th&gt;Landline&lt;/th&gt;&lt;th&gt;Mobile&lt;/th&gt;&lt;th&gt;Email&lt;/th&gt;&lt;th&gt;Remarks&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;';
          for (var i = 0; i &lt; objItems.length; i++) {
              tableContent += '&lt;tr&gt;';
              tableContent += '&lt;td&gt;' + objItems[i].Designation + '&lt;/td&gt;';
              tableContent += '&lt;td&gt;' + objItems[i].Name + '&lt;/td&gt;';
              tableContent += '&lt;td&gt;' + objItems[i].Landline + '&lt;/td&gt;';
              tableContent += '&lt;td&gt;' + objItems[i].Mobile + '&lt;/td&gt;';
              tableContent += '&lt;td&gt;' + objItems[i].email + '&lt;/td&gt;';
              tableContent += '&lt;td&gt;' + objItems[i].Remarks + '&lt;/td&gt;';         
              tableContent += '&lt;/tr&gt;';
          }
          document.getElementById(&quot;contactsTable&quot;).innerHTML = (tableContent);
      }
  });
  </code></pre>