Hi This is my json value
constructor() {
super();
this.exportpdf = this.exportpdf.bind(this);
this.state = {
sales: [
{
customStudentId: "2064517",
studentRoll: 26,
studentName: "Md. Faiaz Jakir ",
stdCtExamMarks: [
{
viewSerial: 1,
subjectName: "Bangla ",
subjectFullMark: 25,
obtainedMark: 0,
highestMarks: 25
}
]
},
{
customStudentId: "2065817",
studentRoll: 27,
studentName: "Miraj Bin Atik ",
stdCtExamMarks: [
{
viewSerial: 1,
subjectName: "English ",
subjectFullMark: 25,
obtainedMark: 0,
highestMarks: 25
}
]
}
]
};
}
And Here I am using primereact datatable. And this is the code i am using to show my data in the table>
<DataTable value={this.state.sales[0].stdCtExamMarks}>
<Column field="subjectName" header="Subject" />
<Column field="subjectFullMark" header="Full Mark" />
<Column field="obtainedMark" header="Obtainedn Mark" />
<Column field="highestMarks" header="Highest Mark" />
</DataTable>
And the value i get for this.state.sales[0].stdCtExamMarks
is
Image Here
But i need both (and so on) stdCtExamMarks values from the json data. How can i do it?