Get nested document field values, transform them and write them as a new field in the nested document

Please read Formatting code and log snippets in posts and update your sample documents so that we can cut-n-paste into our system.

Also share the expected result.

Share what you tried and how it failed so that we can avoid experimenting in a direction you already know that fails.