Skip to content

Instantly share code, notes, and snippets.

@sakapun
Last active October 15, 2015 19:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sakapun/c516157fa4e8dbf01729 to your computer and use it in GitHub Desktop.
Save sakapun/c516157fa4e8dbf01729 to your computer and use it in GitHub Desktop.
JAWS長岡20151013 サンプルコピペソース集
{
"name": "sakapun",
"email": "sakapun5th@gmail.com"
}
http://jsonplaceholder.typicode.com/users
#set($inputRoot = $input.path('$'))
<html>
<body>
<table border="1">
<tr>
<td>name</td><td>email</td>
</tr>
#foreach($elem in $inputRoot)
<tr>
<td>"$elem.name"</td>
<td>"$elem.email"</td>
</tr>
#end
</table>
</body>
</html>
exports.handler = function(event, context) {
var name = (event.name === undefined ? 'No-Name' : event.name);
var email = (event.email === undefined ? 'No-Email' : event.email);
context.done(null, [{"name": name, "email": email}]); // SUCCESS with message
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment