Dataweave Exercise: Filter Like Functions in Arrays Module – Part 1

Functions are divided into modules in dataweave, just as methods are divided into packages in Java. Today I'll show you how to use a few functions in the arrays module that are similar to but not equivalent to the filter function.

Arrays module functions that we are going to discuss are drop, dropWhile, which are introduced in the dataweave 2.2.0 version. The reason for comparing these functions to filter is that, just like filter, they also operate on an array to produce the desired result based on some criteria.