question

Timothy Allard avatar image
Timothy Allard asked

How do I compare a value of a slot?

Hello, I have a custom slot. Lets say its called "Category". In my Lambda js how can i compare the result to something. For example: var itemCategorySlot = intent.slots.Category; if (itemCategorySlot.value == "something") { // } else { } Thanks! Tim
alexa skills kitvoice-user interface
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

Nick Gardner avatar image
Nick Gardner answered
You should be able to do it like a normal slot. For getting the value out of a slot named Color, you'd just use intent.slots.Color.value. -Nick
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.