嗨,这是我的 json 值
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
}
]
}
]
};
}
在这里,我使用的是 primereact 数据表。这是我用来在表格中显示我的数据的代码>
<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>
我得到的价值this.state.sales[0].stdCtExamMarks
是
Image Here
但我需要来自 json 数据的两个(等等)stdCtExamMarks 值。我该怎么做?