Answer the question
In order to leave comments, you need to log in
How to convert JSON to array (JS, Angular, TypeScript)?
Does anyone know how a JSON object can be converted to an array ?
and the object has nested elements, for an unlimited number of levels
Answer the question
In order to leave comments, you need to log in
Recursively loop through the properties of an object and output them to an array.
Here is an example of searching for a property at any level of nesting -
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question