I am looking to extract string values from a multi-dimensional array and store them in a new array as the answer.
For Example :
var dimStr = [ "First-one", ["Double-one", "Double-two", "Double-three",
["Triple-one", "Triple-two"] ], "First-two" ] ;
The expected output is :
output = ["First-one", "Double-one", "Double-two", "Double-three", "Triple-one",
"Triple-two", "First-two" ] ;
I appreciate your help with this task.
The end result should be a new array containing all string values extracted from dimStr