Trying to Replace Text in Array

What are you trying to achieve?

Hi everyone,

I’m trying to modify the shipping method title in the shipping line array for a WooCommerce order, but I haven’t been successful so far. The goal is to replace the default “Flat Rate” text with “TNT” in the shipping method title.

Has anyone managed to replace text within an array element like this? Any guidance or ideas on how to correct my approach would be greatly appreciated!

Steps taken so far

Here’s what I’ve tried:

{{replace(get(map(3.shippingLines; “value”; “method_title”; “Flat Rate”); 1); “Flat Rate”; “TNT”)}}
{{replace(3.shippingLines.methodTitle; “Flat Rate”; “TNT”)}}
Neither of these approaches is working as expected. I suspect I might be making an error in targeting the array or in the syntax for replace or map.

Screenshots: scenario setup, module configuration, errors