JSFiddle - React, Tailwind, and code Playground

Data source

by Flexmonster Pivot Table

HTML

<link rel="stylesheet" href="https://s3.amazonaws.com/flexmonster/2.3/demo.css">
<script src="https://cdn.flexmonster.com/flexmonster.js"></script>

<div id="pivot-container"></div>

JavaScript

const pivot = new Flexmonster({
  container: "pivot-container",
  componentFolder: "https://cdn.flexmonster.com/",
  toolbar: true,
  report: {
    options: {
      grid: {
        type: "flat",
      },
    },
    dataSource: {
      data: getData(),
    },
  },
})

function getData() {
  return [
    ["Student", "Hobby", "Age", "City"],
    ["Steve Colby", "Play Baseball", 17, "New York"],
    ["Steve Colby", "Learn French", 17, "New York"],
    ["Steve Colby", "Play the guitar", 17, "New York"],
    ["Mike Mitchell", "Programming", 16, "Los Angeles"],
    ["Mike Mitchell", "Play video games", 16, "Los Angeles"],
  ]
}