const arr = _.flatten([[10], [20, [33, [40]], 50]]); console.log(arr); // => [10,20,[33,[40]],50]
_.flatten(Array)
Parameters description
Array: [Required] The Array which you want to convert to 1 Dimensional Array on first level.
Example Demo
0 Comments