January 2019
Intermediate to advanced
490 pages
15h 37m
English
You can use #set to define a variable that can be used within the template.
Our (original) template is as follows:
{ "name" : $input.json('$.user.name'), "time": $input.json('$.greeting.time') }
The template, when rewritten by using #set, is as follows:
#set($inputRoot = $input.path('$')){ "name" : "$inputRoot.user.name", "time": "$inputRoot.greeting.time"}
Read now
Unlock full access