I want to construct query string in the API Gateway mapping template. I have something like this
#foreach($entry in $entries)
#set($count = $foreach.count)
#set($entriesQueryString = "$!{entriesQueryString}Id=${count}&"
#end
The idea is to append new string as long as there are entries provided in the input.
Is my code valid? Any other ways to do append?
According to this post and VTL user guide page, the way concatenation is done is just by "putting items together". From the VTL guide:
So I guess that's the only way.