code: function removeUndefined(o) {
      for (let k in o) {
          if (o[k] === undefined && o.hasOwnProperty(k)) {
              delete o[k];
          }
      }
  }
docs: Removes keys with 'undefined' values from an object (changes in-place)
  
  @param {Object} o