I have two arrays from both arrays i have to get first value from one array and i have to get first value from second array and concatenate both values

i have two arrays both have like for example 8 line items and i have to get first value one array and i have to get first value from second array and concatenate both of them like for this i to do for entire array like

1st array {hi, my, name}
2nd array {my, name, is}

i want hi my
my name
name is

like this i want final ouput.
anyone please help on this

@Sathish_Sathish1

Please try this

array1.Zip(array2, function(x,y) x + " " + y).ToList()

Cheers

1 Like

anil thanks for the reply couldnt understand ur logic but i will say like i have one regex output which contains 8 lines and i have another regex output which contains 8 lines but splitting these and have to combine both arrays of first line like Array(0)
Array1(0)
into final output variable

@Sathish_Sathish1
Just as @Anil_G stated, or you could create another array and just change the .ToList() to .ToArray()
image
Regards

1 Like

really thanks for the effort @Anil_G but i want for regex outputs could u please loo into my question and reply for it and im really sorry i didnt ask it straight forward

@Sathish_Sathish1

You can use the same for regex output as well it would be like this


regexoutput1.Select(function(x) x.Value).ToArray.Zip(regexoutput2.Select(function(x) x.Value).ToArray,function(a,b) a + " " + b).ToList()

Cheers

thanks for the reply anil_g will try and will let u know btw what code is this… is this vb,net?

@Sathish_Sathish1

Yes

You can check more here

Cheers

1 Like

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