Announcements

Between mid-October and November, the content on AREA will be relocated to the Autodesk Community M&E Hub and the Autodesk Community Gallery. Learn more HERE.

Can I remove items from array based on other things other than index location?

Can I remove items from array based on other things other than index location?

Anonymous
Not applicable
513 Views
1 Reply
Message 1 of 2

Can I remove items from array based on other things other than index location?

Anonymous
Not applicable

I have an array that looks like this

arr = #("1f_false", "2f_false", "3f_false", "4f_false", "5f_true", "6f_true", "7f_true", "8f_false", "9f_false")

 

I would like to delete items from array that have the string "false" in them leaving only an array that looks like this:

arr = #( "5f_true", "6f_true", "7f_true")

Is there a way to delete items in array based on characteristics of the items in the array as opposed their index location in the array like "deleteItem" does?

 

and can I remove portions of the items in an array like if I want to remove the "_true" part only?

thanks

0 Likes
Accepted solutions (1)
514 Views
1 Reply
Reply (1)
Message 2 of 2

Swordslayer
Advisor
Advisor
Accepted solution