How do I delete parts from an array

studio
variable

#1

I am trying to delete the even array but I do not know how.

for example, I have an array variable: array{(0),(1),(2),(3),(4)…}, I want to delete the even ones (0),(2),(4)… within the array.


I am trying to delete the parts of array contains “someString”, and all the parts happen to be even number of index. It will also be great if you can provide me the method of how to delete parts of array which contains"keyword".


#2

Hello @eb978xz use below:
(From item In MyArray Select item where Cint(item) Mod 2 <> 0 Order By item Ascending).ToArray


#3

Thanks for your reply, can you please kindly specify your solution more clearly?
Is this the actual code that I need to add? Where should I add the code? Should I still use for each activity?

Best regards!


#4

use above in assign activity:
MyArray assign (From item In MyArray Select item where Cint(item) Mod 2 <> 0 Order By item Ascending).ToArray
in MyArray you get only odd numbers


#5

Big thanks it worked.