Thanks Bruce, thanks Andy,
That was helpful. I managed to build the JSON structure I was looking for by adding a function similar to this one:
outputmacro: ^testfn variable ($_name $_object)
if ($_object) {
$testCSV.$_name = $_object
}
else {
$testCSV.$_name = $_name
}
Bruce, I can’t help but think that the way I’m trying to use ChatScript, is contrary to how you originally intended it to be used. Would love you opinion on the design I’m trying to implement:
- Chatscript is the backend to a platform we’re building, data (such as CMS entries, states, etc.) are passed to chatscript from our front-end as JSON.
- As chatscript learns about the user (name, email, preferences, etc) it passes those back to the frontend / platform as JSON.
Here’s what I’m starting to notice: there doesn’t seem to be an easy way to import JSON and keep it as a JSON structure. Would the “best practices” here involve:
External JSON -> Chatscript Facts
Chatscript Facts -> External JSON
And then use the extensive fact library to manage knowledge and content within chatscript?
Thanks for your help on this forum, it’s been very valuable.