watson-assistant

How do I parse out a value in the response where the field name has a colon?


Trying to create a chatbot to retrieve data from IBM TRIRIGA. The responses provided back by TRIRIGA uses prefixes, thus field names become like spi:triNameTX.

I believe I'm getting back a correct response. In the Inspector I get:

body.rdfs:member.0.spi:triOrganizedByTX = KENNY

I need the value Kenny, but I just cannot get it. Can someone help? Thanks!!

Using Watson Assistant Expressions


Solution

  • Use the supported expression language. Specifically for your question try getMatch https://cloud.ibm.com/docs/watson-assistant?topic=watson-assistant-dialog-methods#dialog-methods-strings-getMatch