A
A
Alex Terechenko2020-08-11 14:20:35
Angular
Alex Terechenko, 2020-08-11 14:20:35

How to write arrays to an object?

Good afternoon: Cannot set property 'id' of undefined here is an error
if (this.categories) {
Object.entries(response).filter((item: any) => {
const array = (String(Object.keys(item[ 1]))).split(',');
if (item[1].category === this.categories) {
for (const k of array){
this.response[k] = Object.values(item[ 1]);
}
}
});

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Andrew, 2020-08-11
@KickeRockK

id where?
the compiler tells you that the object you want to ask for id does not exist.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question