code: function replaceValue(obj, key, value) {
    if (!obj) return;
    if (obj instanceof Array) {
      for (const i in obj) {
        replaceValue(obj[i], key, value);
      }
    }
    if (obj[key]) obj[key] = value;
    if (typeof obj === 'object' && obj !== null) {
      const children = Object.keys(obj);
      for (let childIndex = 0; childIndex < children.length; childIndex++) {
        replaceValue(obj[children[childIndex]], key, value);
      }
    }
    return obj;
  }
docs: search key in object recursive and replace value in it