Data types in JSON

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

var pivot = new Flexmonster({
  container: "pivot-container",
  componentFolder: "https://cdn.flexmonster.com/",
  toolbar: true,
  report: {
    "dataSource": {
      "type": "json",
      "data": getData()
    },
    "options": {
      "grid": {
        "type": "flat",
        "showTotals": "off",
        "showGrandTotals": "off"
      },
      "defaultDateType": "date string",
      "datePattern": "dd.MM.yyyy hh:mm:ss"
    }
  }
});

function getData() {
  return [{
      "ProductSerialNo": {
        "type": 'string'
      },
      "DataCollectionTime": {
        "type": 'date string'
      }
    },
    {
      "ProductSerialNo": "3370148020134001",
      "DataCollectionTime": "2020-04-02T16:19:36.710Z",
    }
  ]
}