cancel
Showing results for 
Search instead for 
Did you mean: 

need an array connector to help makers

 

We need a connector for arrays in Flow to help makers.

 

Sure, we can do first() and last() but wrap those in an easy to use connector with typing.

 

Also throw in get(index) and first( with-@item()-filter ) 

 

In addition to the AppendToArray, let's have operations that mutate an array as well - TakeFirst and TakeLast (will let us build queues and stack)

 

 

Status: New
Comments
Level: Powered On
Well, at least with get(index) and first() you can use: arrayItem?[int]. The index variable doesn't need to be a string. So first() would be arrayItem?[0]

as with first( @item() ) if you are talking about the item itself you can just do item()?[0]. And like functions, index's can have nested functions as well. so, @ item[ sub( length( arrayitem, 2) ) ] for the 2nd to last object works just fine.

But yeah TakeFirst and TakeLast that we can call on variables would be so nice.