code: function cleanObject(obj) {
    if (obj.$t !== undefined) {
      let keysLength = Object.keys(obj).length;
      if (keysLength === 1 || (keysLength === 2 && obj.type !== undefined)) {
        return obj.$t;
      } else {
        obj.text = obj.$t;
        delete obj.$t;
      }
    }
  
    return obj;
  }
docs: Gets rid of unnecessary keys in an object
  and if the only keys in an object are `$t` or `$t` and `type`
  it makes the whole object the value of `$t`
  otherwise it renames `$t` to `text` for consistency.
  
  @param {Object}
  @returns {Object}