json-react-table

1.0.4 • Public • Published

json-react-table

JSONtoTABLE component helps to convert json to table with remove key's

NPM JavaScript Style Guide

Install

npm i json-react-table

Usage

import React from 'react'

import { JsonTable } from 'json-react-table'
import 'json-react-table/dist/index.css'
const App = () => {
  const data=[
  {name:'bala',age:500,address:'Paramakudi',country:'USA'},
  {name:'chandra',age:600,address:'Melur',country:'USA'},
  {name:'varun',age:700,address:'Thuraiyur',country:'USA'}]
  const removeArray=['address','country']
  return <>  
      <h2 align='center'>Json Table without filter</h2>

      <table className='timecard'>
        <JsonTable data={data}/>
      </table>  

      <br/>

      <h2 align='center'>Json Table with filter (age)</h2>

      <table className='timecard'>
        <JsonTable data={data} removeField={removeArray}/>
      </table>  
      
      <br/>
  </>
}

export default App

Output

alt text

License

MIT © Balamurugan

Readme

Keywords

none

Package Sidebar

Install

npm i json-react-table

Weekly Downloads

26

Version

1.0.4

License

MIT

Unpacked Size

13 kB

Total Files

7

Last publish

Collaborators

  • balacsc51