I would like my Notehub route to include only ‘Open’ Notecard session data and exclude ‘Closed’ session data. What type of expression should I use in the JSONata transform field to accomplish this?
To exclude ‘Closed’ session data from your existing Notehub route, navigate to the Data section in your route settings. In the Transform Data dropdown, select JSONata Expression. In the JSONata Expression field, enter the following expression:
(
$result := $;
$contains(body.why, "closed") ?
$doNotRoute() : $result;
)
3 Likes