G
G
Grigore Vodnicear2017-09-21 16:21:19
JavaScript
Grigore Vodnicear, 2017-09-21 16:21:19

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

2 answer(s)
P
Pavel Kornilov, 2017-09-21
@grigvod

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 -

I
Igor Bezlepkin, 2017-09-22
@iBezlepkin

And you can ask why you can not use the object?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question