Reputation: 41
#if($inputRoot.objectType == 'Test'), "TableName": "StudentTests", #else,"TableName": "UserActions", #end
if use if condition i got an error in postman link ## "__type": "com.amazon.coral.service#SerializationException" ##
Upvotes: 4
Views: 7983
Reputation: 4666
The way I understand your question I would do :
#if($inputRoot.objectType == "Test")
#set($tableName = "StudentTests"
#else
#set($tableName = "UserActions"
#end
{
"TableName": "$tableName",
"Key": ...
}
Upvotes: 7