lib/command/run-multiple.js
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;
}
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;
}
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 ; }
search key in object recursive and replace value in it
search key in object recursive and replace value in it