I retrieved a JSON object in the following format
response = [
{
'a': [
{
'b': [
{
'c': [
{
'name': 'abc',
'value': 900
}
]
}
]
}
]
},
{
'a': [
{
'b': [
{
'c': [
{
'name': 'abc',
'amount': 900
}
]
}
]
}
]
}
];
Now, I am trying to iterate through the object as shown below
this.response.forEach(
(event) => {
event.a.forEach(
() => {
}
);
}
)
However, while compiling, an error message is thrown
error TS2349: Cannot invoke an expression whose type lacks a call signature. Type '((callbackfn: (value: { 'b': { 'c': { 'name': string; 'value': number; }[]; }[]; }, index: number...' has no compatible call signatures.
Is there any solution for the above error? Thank you in advance.