Answer the question
In order to leave comments, you need to log in
How to modify json in angular?
I get json from the server in the form { "Name1": "Link1" , "Name2": "Link2", }. How in angular8 to convert it to an array of elements with fields
{name : Name1
link: Link1}
For further output in the template, if using regular expressions, then how to use them in Angular 8?
Answer the question
In order to leave comments, you need to log in
Solved the problem like this
this.mass = Object.keys(json).map(key => ({name: key, link: json[key]}));
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question