Convert String()() to String() In Vb.Net

I have an array of array of string but i would want it to become a simple array of string.
i.e
I have String()() = {{“boy”,“girl”},{“man”,“woman”,“child”}}
and i want it as String() = {“boy”,“girl”,“man”,“woman”,“child”}

Hi,

Can you try the following expression?

arrStr = arrArrStr.SelectMany(Function(a) a).ToArray

Note: arrStr is String[] type. arrArrStr is String[][] type.

Regards,

3 Likes

Hi @MasterOfLogic,

You are trying to flatten an array of array (Jagged array). In short converting the dimension of the array.

You can use one of the solution in this thread.

In UiPath:
Assign a variable and use this as the value in the assign :

Yourarray.SelectMany(x=>x).ToArray()
2 Likes

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.