Skip to content

Instantly share code, notes, and snippets.

@PaulieScanlon
Created June 20, 2024 14:40
Show Gist options
  • Save PaulieScanlon/ab42b3870083974b56c5273fab273ab3 to your computer and use it in GitHub Desktop.
Save PaulieScanlon/ab42b3870083974b56c5273fab273ab3 to your computer and use it in GitHub Desktop.
Report markdown string
// src/index.js#L42
const report = response.rows
.map((row, index) => {
const { dimensionValues, metricValues } = row;
return `${index + 1}. <https://${dimensionValues[0].value}|${dimensionValues[1].value}> | *x${
metricValues[0].value
}*`;
})
.join('\\n')
.replace(/\\n/g, '\n');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment