Skip to content

Instantly share code, notes, and snippets.

@adrianhall
Created November 29, 2018 21:48
Show Gist options
  • Save adrianhall/6d9977da16556bd976d45fe110feb698 to your computer and use it in GitHub Desktop.
Save adrianhall/6d9977da16556bd976d45fe110feb698 to your computer and use it in GitHub Desktop.
#if($ctx.error)
$util.error($ctx.error.message, $ctx.error.type)
#end
#set($idList = [])
#foreach($item in $context.result.items)
$util.qr($idList.add($item.locationId))
#end
#set($result = {})
$util.qr($result.put("ids", $idList))
$util.qr($result.put("nextToken", $ctx.result.nextToken))
$util.toJson($result)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment