I have an array which contains objects. These objects may have other arrays of objects, then those objects also may have other objects and array of objects. There is no limit really.
So how do I go through all the objects in this array no matter how deeply nested they are? If I know how deep the arrays go, I can easily do this by using a number of for loops. I having problem with going through all the elements.
I am not able to come up with a logic to do that. Can somebody please help me? I am trying to do this in swift.