How do I get the name of an entity?
Content
Hi,
I have a question regarding entities. I have 2 entities, each containing a list of hotels. The entities are called hotelsAreaOne and hotelsAreaTwo. They are all connected to an intent called "staying". When the user types: I am staying at hotel "hotelInAreaOne" the intent resolves correctly to "staying". The expression ${iResult.value.entityMatches['hotelsAreaOne'][0]} returns 'hotelInAreaOne' which is just fine. In the JSON I can also see this works fine:
"entityMatches": { "hotelsAreaOne": [ "hotelInAreaOne" ] }
However, what I would like to get hold of, is the actual value of the entity itself, in this case 'hotelsAreaOne'. Not sure if this is possible, but curious to know how to do this.
Tagged:
1