%dw 2.0
output application/json
---
in0 map ((user) ->
    user update {
        case name at .name if(user.age == 30) -> name ++ "Young"
        case name at .name if(user.age == 70) -> name ++ "Old"

    }
)
