How to Access Nested Fields in React-Bootstrap-table ? Last Updated : 28 Apr, 2025 Comments Improve Suggest changes Like Article Like Report React-Bootstrap-Table provides a set of components and utilities that make it easy to create tables with features like sorting, filtering, pagination, and more. To access nested fields in React-Bootstrap-Table, you can use the dataField property of your column definitions to specify the path to the nested field in your data. Steps to Create React Application And Installing Module:Step 1: Create a React Application using the below commandnpx create-react-app <foldername>Step 2: After creating your project folder i.e. <foldername>, move to it using the below command.cd foldernameStep 3: After creating the ReactJS application, Install the required modules using the below command.npm i react-bootstrap-table-nextStep 4: Add the required imports for the react-bootstrap-tableimport BootstrapTable from 'react-bootstrap-table-next';import 'react-bootstrap-table-next/dist/react-bootstrap-table2.min.css'; Project Structure: Folder StructureExample: Now write down the following code in the App.js file. Here, in the App.js file we will import and render the <MyTable/> Component. Lets see the code for MyTable.jsx file. JavaScript import React from 'react'; import BootstrapTable from 'react-bootstrap-table-next'; import 'react-bootstrap-table-next/dist/react-bootstrap-table2.min.css'; const columns = [ { dataField: 'id', // Top-level field text: 'ID', }, { // Access the nested 'name' field of // the 'geek' object dataField: 'geek.name', text: 'Name', }, { // Access the nested 'age' field of the 'geek' object dataField: 'geek.age', text: 'Age', }, ]; const MyTable = ({ data }) => { return <BootstrapTable keyField="id" data={data} columns={columns} />; }; export default MyTable; Now, lets import the MyTable.jsx component in the App.js file. JavaScript import './App.css'; import MyTable from './MyTable'; function App() { const data = [ { id: 1, geek: { name: 'Mahesh', age: 30, }, }, { id: 2, geek: { name: 'Ramesh', age: 25, }, }, { id: 3, geek: { name: 'Suresh', age: 20, }, }, ]; return ( <div className="App"> <MyTable data={data} /> </div> ); } export default App; Step to Run Application: Run the application using the following command from the root directory of the project:npm startOutput: Now open your browser and go to http://localhost:3000/, you will see the following output: React Bootstrap Table Comment More infoAdvertise with us Next Article How to Access Nested Fields in React-Bootstrap-table ? M maheshgaikwad Follow Improve Article Tags : Web Technologies ReactJS Geeks Premier League React-Bootstrap Geeks Premier League 2023 +1 More Similar Reads How to create a table in react-native ? React native is a framework developed by Facebook for creating native-style apps for iOS & Android under one common language, JavaScript. Initially, Facebook only developed React Native to support iOS. However, with its recent support of the Android operating system, the library can now render m 2 min read How to Access child's state in React? Accessing the child state in from parent component directly is not possible. React follows unidirectional data flow where data is passed from child to parent. But we can access the child state in react with the help of ref and callback. PrerequisitesReact JSProps and StateReactJS RefHow to Access Ch 4 min read How to add Table in React Native ? React Native is an open-source UI software framework created by Meta Platforms, Inc. It is used to develop applications for Android, Android TV, iOS, macOS, tvOS, Web, Windows, and UWP by enabling developers to use the React framework along with native platform capabilities. In this article, we will 2 min read How to add table footers with react-bootstrap-table? In this article we are going to learn about table footers with react-bootstrap-table.Table footers in React-Bootstrap-Table enable custom content at the bottom of a table. They're created either by defining footer content within column definitions or by rendering a separate footer element outside th 3 min read How to load data from JSON into a Bootstrap Table? This article describes how a Bootstrap Table is created using a given JSONÂ data. The data can be retrieved by either importing it or representing it in JavaScript. The following are given two methods to do it. Displaying JSON data without importing any file: The JSON file that has to be read can be 4 min read Like