In JavaScript, I am looking to update a value in an array of objects.
export var headingLeistenbelegung = [
[ {value: 'Projektnummer: ', style: styles.headerDarkBold},
{value: '121466', style: styles.headerDark},
{value: 'Projektbezeichnung: ', style: styles.headerDarkBold},
{value: 'adsadköald', style: styles.headerDark},
],
[
],
[ {value: 'Server ID: ', style: styles.headerDarkBold},
{value: '3', style: styles.headerDark},
{value: 'Serverbezeichnung: ', style: styles.headerDarkBold},
{value: 'ANlage dies und das', style: styles.headerDark},
],
[
],
[ {value: 'Bucht: ', style: styles.headerDarkBold},
{value: 'X3', style: styles.headerDark},
{value: 'Leiste: ', style: styles.headerDarkBold},
{value: 'leistenNummer', style: styles.headerDark},
],
[
],
];
...
for(var k = 0; k<5; k++){
log("Avorher")
log(excelData.headingLeistenbelegung)
excelData.headingLeistenbelegung[4][3].value = k.toString()
log("Anachher1")
log(excelData.headingLeistenbelegung[4][3].value)
log("Anachher2")
log(excelData.headingLeistenbelegung)
}
Upon logging the value of 4, it seems to return something unexpected. I have attempted creating a local copy of headingLeistenbelegung, but encountered the same issue. This update is essential for integrating the heading into an Excel sheet later on.