nick-bourque-react-json-to-table
TypeScript icon, indicating that this package has built-in type declarations

0.1.10 • Public • Published

nick-bourque-react-json-to-table (forked from Riza Nugraha's https://github.com/thehyve/react-json-to-table)

React library to convert JSON to HTML

Installation

npm install nick-bourque-react-json-to-table

Usage

https://codesandbox.io/s/jn3z0mmw2v


import { JsonToTable } from "nick-bourque-react-json-to-table";

function App() {
  // ===================== //
  // JSON Object
  // ===================== //
  const myJson = {
    "Student": { name: "Jack", email: "jack@xyz.com" },
    "Student id": 888,
    "Sponsors": [
      { name: "john", email: "john@@xyz.com" },
      { name: "jane", email: "jane@@xyz.com" }
    ]
  };

  return (
    <div className="App">
      {/* ===================== */}
      {/* HOW TO USE IT         */}
      {/* ===================== */}
      <JsonToTable json={myJson} />
      {/* ===================== */}
    </div>
  );
}

const rootElement = document.getElementById("root");
ReactDOM.render(<App />, rootElement);

/nick-bourque-react-json-to-table/

    Package Sidebar

    Install

    npm i nick-bourque-react-json-to-table

    Weekly Downloads

    3

    Version

    0.1.10

    License

    GPL-3.0

    Unpacked Size

    64.6 kB

    Total Files

    25

    Last publish

    Collaborators

    • nickbourque