🌐
npm
npmjs.com › package › @uiw › react-json-view
@uiw/react-json-view - npm
More in-depth customization (#19) import React from 'react'; import JsonView from '@uiw/react-json-view'; const object = { _id: "ObjectId('13212hakjdhajksd')", uid: "test1", attival_time: new Date('Tue Sep 13 2022 14:07:44 GMT-0500 (Central Daylight Time)'), __v: 0 } export default function Demo() { return ( <JsonView value={object} // keyName="root" displayObjectSize={false} style={{ '--w-rjv-background-color': '#ffffff', }} > <JsonView.Quote render={() => <span />}/> <JsonView.String render={({ children, ...reset }, { type, value, keyName }) => { if (type === 'type') { return <span /> } if (
      » npm install @uiw/react-json-view
    
Published   Jan 20, 2026
Version   2.0.0-alpha.41
Author   Kenny Wang
🌐
React Split
uiwjs.github.io › react-json-view
react-json-view
A React component for displaying and editing javascript arrays and JSON objects.
🌐
GitHub
github.com › mac-s-g › react-json-view
GitHub - mac-s-g/react-json-view: JSON viewer for react · GitHub
JSON viewer for react. Contribute to mac-s-g/react-json-view development by creating an account on GitHub.
Starred by 3.7K users
Forked by 500 users
Languages   JavaScript 96.4% | Shell 2.9%
🌐
npm
npmjs.com › package › react-json-view
react-json-view - npm
Interactive react component for displaying javascript arrays and JSON objects.. Latest version: 1.21.3, last published: 5 years ago. Start using react-json-view in your project by running `npm i react-json-view`. There are 900 other projects ...
      » npm install react-json-view
    
Published   Mar 09, 2021
Version   1.21.3
Author   Mac Gainor
🌐
GitHub
github.com › uiwjs › react-json-view
GitHub - uiwjs/react-json-view: A React component for displaying and editing javascript arrays and JSON objects.
Advanced Customization - Deep customization example showing how to hide type indicators and quotes for a cleaner MongoDB-like object display (#19) import React from 'react'; import JsonView from '@uiw/react-json-view'; const object = { _id: "ObjectId('13212hakjdhajksd')", uid: "test1", attival_time: new Date('Tue Sep 13 2022 14:07:44 GMT-0500 (Central Daylight Time)'), __v: 0 } export default function Demo() { return ( <JsonView value={object} // keyName="root" displayObjectSize={false} style={{ '--w-rjv-background-color': '#ffffff', }} > <JsonView.Quote render={() => <span />}/> <JsonView.Str
Starred by 398 users
Forked by 23 users
Languages   TypeScript 98.0% | HTML 2.0% | TypeScript 98.0% | HTML 2.0%
🌐
npm
npmjs.com › package › react-json-view-lite
react-json-view-lite - npm
JSON viewer component for React focused on performance for large volume input while still providing few customiziation features. Latest version: 2.5.0, last published: 6 months ago.
      » npm install react-json-view-lite
    
Published   Sep 06, 2025
Version   2.5.0
Author   AnyRoad
🌐
Microlink
react-json-view.microlink.io
react-json-view
react-json-view: A React component for displaying and editing JSON data in a tree view format.
🌐
npm
npmjs.com › package › react-json-view › v › 1.19.1
react-json-view
npm i react-json-view@1.19.1 · github.com/mac-s-g/react-json-view · github.com/mac-s-g/react-json-view · 1.19.1 · MIT · 175 kB · 6 · 4 years ago · Try on RunKit ·
      » npm install react-json-view
    
Published   Mar 09, 2021
Version   1.19.1
Author   Mac Gainor
🌐
GitHub
github.com › mac-s-g › react-json-view › issues › 441
Doesn't support React 18? · Issue #441 · mac-s-g/react-json-view
January 20, 2023 - I tried to install the library in one of my applications, which runs on react 18. But i got the following error - Does it not support React 18?
Author   punit1108
Find elsewhere
🌐
GitHub
github.com › HuolalaTech › react-json-view
GitHub - HuolalaTech/react-json-view: <ReactJsonView /> is a react component for displaying serializable data.
imoprt React from 'react'; import ReactDOM from 'react-dom'; import ReactJsonView from '@huolala-tech/react-json-view'; import '@huolala-tech/react-json-view/dist/style.css'; const data = [1,2,3,4] const App = () => { return ( <div id="app"> <ReactJsonView source={data} darkMode={false} rootLabel="Response data" keyCount={200} defaultExpand={false} maxTitleSize={100} /> </div> ); }; ReactDOM.render( <React.StrictMode> <App /> </React.StrictMode>, document.getElementById('root') as HTMLElement )
Author   HuolalaTech
Top answer
1 of 3
1

I think that your issue is more related to the conversion from an object to an array, to be able to iterate on it. There are multiple ways to do that:

1 - You can use Object.entries() as @hgb123 recommended you:

const myObject = { a: 1, b: 2, c: 3};
const myArray = Object.entries(myObject);
console.log(myArray);

2 - You can get the keys of the object using Object.keys(), as @Gandzal recommended you, and iterate on the returned array:

const myObject = { a: 1, b: 2, c: 3};
const myKeys = Object.keys(myObject);
console.log(myKeys);
const myArray = myKeys.map(key => [key, myObject[key]]);
console.log(myArray);

3 - Or you can use Array.prototype.reduce() on the array returned by Object.keys():

const myObject = { a: 1, b: 2, c: 3};
const myArray = Object.keys(myObject).reduce((arr, key) => [...arr, [key, myObject[key]]], []);
console.log(myArray);

Whatever method you choose, iterate on an array, and display its results is easy after the conversion:

const data = {
  "2020-09-19": [
    {
      end: "2020-09-19T10:30:00Z",
      start: "2020-09-19T06:52:10Z",
      user: "rakul",
    },
    {
      end: "2020-09-19T18:30:00Z",
      start: "2020-09-19T10:30:00Z",
      user: "jeet",
    },
    {
      end: "2020-09-20T02:30:00Z",
      start: "2020-09-19T18:30:00Z",
      user: "rahul",
    },
  ],
  "2020-09-22": [
    {
      end: "2020-09-20T10:30:00Z",
      start: "2020-09-20T02:30:00Z",
      user: "rakul",
    },
    {
      end: "2020-09-20T18:30:00Z",
      start: "2020-09-20T10:30:00Z",
      user: "jeet",
    },
    {
      end: "2020-09-21T02:30:00Z",
      start: "2020-09-20T18:30:00Z",
      user: "rahul",
    },
  ],
};

const List = props => Object.entries(props.data).map(([date, items]) => (
      <div key={date}>
          <strong>{date}</strong><br/><br/>
          {
              items.map((content, index) => (
                  <span key={index}>
                      start: {content.start}<br/>
                      end: {content.end}<br/>
                      user: {content.user}<br/><br/>
                  </span>
              ))
          }
      </div>
  ));

ReactDOM.render(
  <List data={data} />,
  document.getElementById('example')
);
<script src="https://cdnjs.cloudflare.com/ajax/libs/react/16.8.6/umd/react.production.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/react-dom/16.8.6/umd/react-dom.production.min.js"></script>

<div id="example"></div>

2 of 3
1

Use Object.entries()

const data = {
  "2020-09-19": [
    {
      end: "2020-09-19T10:30:00Z",
      start: "2020-09-19T06:52:10Z",
      user: "rakul",
    },
    {
      end: "2020-09-19T18:30:00Z",
      start: "2020-09-19T10:30:00Z",
      user: "jeet",
    },
    {
      end: "2020-09-20T02:30:00Z",
      start: "2020-09-19T18:30:00Z",
      user: "rahul",
    },
  ],
  "2020-09-22": [
    {
      end: "2020-09-20T10:30:00Z",
      start: "2020-09-20T02:30:00Z",
      user: "rakul",
    },
    {
      end: "2020-09-20T18:30:00Z",
      start: "2020-09-20T10:30:00Z",
      user: "jeet",
    },
    {
      end: "2020-09-21T02:30:00Z",
      start: "2020-09-20T18:30:00Z",
      user: "rahul",
    },
  ],
}

Object.entries(data).forEach(([date, content]) => {
  console.log(date)
  content.forEach((c) => {
    console.log('\t', c.start, c.end, c.user)
  })
})

🌐
UNPKG
unpkg.com › browse › react-json-view@1.2.1 › package.json
react-json-view
{ "name": "react-json-view", "description": "interactive json viewer wrapped up in a react component", "version": "1.2.1", "main": "dist/main.js", "files": [ "dist/" ], "devDependencies": { "babel-core": "^6.21.0", "babel-eslint": "~7.1.1", "babel-loader": "^6.2.10", "babel-plugin-transfor...
🌐
GitHub
github.com › microlinkhq › react-json-view
GitHub - microlinkhq/react-json-view: JSON viewer for React · GitHub
react-json-view (rjv) is a React component for displaying and editing javascript arrays and JSON objects.
Starred by 382 users
Forked by 67 users
Languages   JavaScript 99.5% | SCSS 0.5%
🌐
npm
npmjs.com › package › @microlink › react-json-view
@microlink/react-json-view - npm
Interactive react component for displaying javascript arrays and JSON objects.. Latest version: 1.27.1, last published: 2 months ago. Start using @microlink/react-json-view in your project by running `npm i @microlink/react-json-view`. There ...
      » npm install @microlink/react-json-view
    
Published   Jan 11, 2026
Version   1.27.1
Author   Mac Gainor
🌐
CloudDefense.ai
clouddefense.ai › code › javascript › example › react-json-view
Top 10 Examples of react-json-view code in Javascript
render() { // eslint-disable-next-line no-undef const ReactJson = require('react-json-view').default const { src } = this.props const StyledReactJsonContainer = styled.div` .string-value { text-overflow: ellipsis; max-width: 800px; overflow: hidden; display: inline-block; } ` return ( )
🌐
CodeSandbox
codesandbox.io › examples › package › react-json-view
react-json-view examples - CodeSandbox
AboutInteractive react component for displaying javascript arrays and JSON objects.753,229Weekly Downloads
🌐
Npm
npm.io › package › react-json-view-new
React-json-view-new NPM | npm.io
.json-view { --json-property: #009033; --json-index: #676dff; --json-number: #676dff; --json-string: #b2762e; --json-boolean: #dc155e; --json-null: #dc155e; } .json-view .json-view--property { color: var(--json-property); } .json-view .json-view--index { color: var(--json-index); } .json-view .json-view--number { color: var(--json-number); } .json-view .json-view--string { color: var(--json-string); } .json-view .json-view--boolean { color: var(--json-boolean); } .json-view .json-view--null { color: var(--json-null); } .json-view:hover > .json-view--copy { display: inline-block; } .json-view .