To use JS in your Templates, you can open a
scripttag and start working.
Let's say you defined your payload as follows:
"title": "12 Monkeys",
You can now access the payload data this way:
let movieTitle = $docPayload.movie.title;