How to upsert fields from an object in an array with the update operator in DataWeave 2.0 | Mule 4

preview_player
Показать описание
In this video, we'll learn how to use the update operator along with the upsert and conditional options. We'll also learn different ways of handling null values for our fields.

In the article version of this video, you can follow along by clicking on the "Open in Playground" buttons to see how the code is being developed and to try it out yourself!

---

📚 FOLLOW US

Video chapters:
00:00 Intro
00:10 Use case
01:11 map function - Iterate through the array and match the user to update
02:33 update operator - Update each field with the new values
04:25 default - Keep original values when needed
05:30 upsert operator - Insert the new field to the original object
06:05 conditionals inside the update operator - Avoid null values per field
07:15 do - Create local scope if needed
08:25 skipNullOn - Avoid null values in the whole output
09:44 Ending
Рекомендации по теме
join shbcf.ru