I have an array something with like this
array = [
1,
2,
"Paul John",
["PJ", 3, "Mark"],
"Mark
]
The array
variable only contains the data types above. How can I iterate through all the elements including each elements if there is another array within it?
Expectations: I should be able to fetch the values below:
1
2
Paul John
Pj
3
Mark
Mark