scripts/build-rpc-markdown.js
function getExample (obj) {
  if (isArray(obj)) {
    return removeOptionalWithoutExamples(obj).map(getExample);
  }

  const { example, details } = obj;

  if (example === undefined && details !== undefined) {
    const nested = {};

    Object.keys(details).forEach((key) => {
      nested[key] = getExample(details[key]);
    });

    return nested;
  }

  return example;
}
function getExample (obj) {
  if (isArray(obj)) {
    return removeOptionalWithoutExamples(obj).map(getExample);
  }

  const { example, details } = obj;

  if (example === undefined && details !== undefined) {
    const nested = {};

    Object.keys(details).forEach((key) => {
      nested[key] = getExample(details[key]);
    });

    return nested;
  }

  return example;
}
function getExample ( obj ) { if ( isArray ( obj ) ) { return removeOptionalWithoutExamples ( obj ) . map ( getExample ) ; } const { example , details } = obj ; if ( example === undefined && details !== undefined ) { const nested = { } ; Object . keys ( details ) . forEach ( ( key ) => { nested [ key ] = getExample ( details [ key ] ) ; } ) ; return nested ; } return example ; }
Grabs JSON compatible
Grabs JSON compatible