I have a response for Angular 11 TypeScript code like:
{
"Id": "12345",
"length": [
{
"a": {
"1": {
"test": [
{
"days": "20"
}
]
}
}
}
]
}
It is unable to fetch data as one parameter is "1
". It’s giving a compilation issue when trying to print the value of days like:
console.log(length[0].a.1.test[0].days);
If it’s "one
" instead of "1
" it’s working fine:
console.log(length[0].a.one.test[0].days);