🚀 New WebDataRocks v. 1.4.Check it out!

React integration with Json


How do i add JSON object to the grid in react? I wrote the following code but data is not showing on the grid:
const tableData =
“Product”: “Apple”,
“Price”: 2.50
“Product”: “Cherry”,
“Price”: 5.25
export class App extends React.PureComponent {

render() {
return (

<WebDataRocksReact.Pivot toolbar={true}
report= {tableData}
export default App;

1 answer

Hugo Martinez October 26, 2018

Judging by this doc, I guess you need to set it the following way:
report={{dataSource: {data: tableData}}}