#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" ##
The way I understand your question I would do :
#if($inputRoot.objectType == "Test")
    #set($tableName = "StudentTests"
#else
    #set($tableName = "UserActions"
#end
{
    "TableName": "$tableName",
    "Key": ...
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With