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 ? 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 How to pass data to a React Bootstrap modal? In React Bootstrap, we have the styling and interactive components of Modal. In simple terms, Modal is nothing but the popup box that is opened when some action has been performed. To make the modal customizable in terms of its behavior, we can pass the custom data to the React Bootstrap modal using 4 min read How to create a table in ReactJS ? In ReactJS, tables are commonly used to display data in rows and columns. Tables can be static, where data is hardcoded, or dynamic, where data is passed from an array or fetched from an API. React makes it simple to create interactive and dynamic tables, with additional features such as sorting, pa 6 min read How to access nested object in ReactJS ? To access a nested object in react we can use the dot notation. But if we want to access an object with multi-level nesting we have to use recursion to get the values out of it. PrerequisitesReact JS NPM & Node.jsJavaScript ObjectApproachThe structure of an object in React JS can be nested many 2 min read How to use Bootstrap in React JS ? Explore the seamless integration of Bootstrap into React JS for enhanced styling and responsive web development. This comprehensive guide provides step-by-step instructions, covering the installation process, utilization of Bootstrap components, and best practices to harness the power of both techno 3 min read How to Add href to React-Bootstrap-Table Column Dynamically ? In this article, we are going to learn how to add a href to the react-bootstrap table column dynamically. In this article, we will create a React Bootstrap table and an input form to add data dynamically with a href. Prerequisites: React JSReact-BootstrapSteps to Create React Application And Install 4 min read Like