Given an array of data, I use the first row to generate the headings, including a pair of buttons like this:
Object.keys(data[0]).map((key, i) => (