I’m currently working on an array from which I’m trying to remove keys with no values. The structure looks like that:
I tried several options but I’m not able to remove my empty keys. The last try was {{remove(128.interventions_dates; null; emptystring)}} but it did not work.
Easiest way to do it is you could remove them by using a iterator and a filter. Then use an aggregator to bring it back all together.
If you want to use inline functions i would suggest you first use the sort function to order it so the empty values are at the end. Then you can use the slice function to remove the items of an array up to a certain item. You can get the value of the end by using the contains() function to find how many items in the array are empty. Then subtract that from the total number of arrays items.