A Review of DataWeave 2.0 Selectors

Introduction

With the introduction of Mule 4, MuleSoft has significantly revamped its functional data transformation language DataWeawe (DW for short), making it even more central to Mule development by having it replace the Mule Expression Language (MEL).  The switch from version 1.0 to 2.0 of DW has brought about many new features without changing the language structure. 

While it is true that non-trivial DW transforms will make use of operators that do structural message transformations on arrays and objects (map, mapObject, pluck, flatten, groupBy), it remains essential to select the right input data for these powerful operators to work on. This is the purpose of data selectors