How Do I Remove an Item From an Server Action Object Array List?

I've read the tutorials from @teodor and @Hyperbytes on this but I still can't work out what to do...

So I have a Server Action Object Array:

array_create

I think that to remove an item I need to set the index to point to that item and them remove it at the index.

array_steps

So I set the index like this:

array_set_index

Then I do a remove at index:

array_remove_at_index

And I need to specify the index... but there is nothing to choose in the data picker from my Set index step.

Am I missing a step here? :thinking:

This is used to update a value at the selected index and this is not related to removing an item from the array:

Screenshot 2024-10-24 at 15.04.04

To remove an item enter its index in the index property.

Thanks for this @teodor.

So how do I find out the index of an array item where its id value is for example 12345?

There's an indexOf option for arrays:

but in your case i don't think it would be possible to use it as it works with primitive values only (numbers and strings) in simple arrays, but it can't be used to search for an object within an array of objects like in your case.

Explanation here: