# How to get JS transformation to "not return anything"

**URL:** <https://community.openhab.org/t/how-to-get-js-transformation-to-not-return-anything/79525>\
**Category:** Scripts & Rules\
**Created:** [August 8, 2019, 7:47am UTC](https://community.openhab.org/t/how-to-get-js-transformation-to-not-return-anything/79525 "2019-08-08T07:47:20Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![rlkoshak](https://community.openhab.org/user_avatar/community.openhab.org/rlkoshak/32/75251_2.png) [@rlkoshak](https://community.openhab.org/u/rlkoshak)\
**Post date:** [August 8, 2019, 3:40pm UTC](https://community.openhab.org/t/how-to-get-js-transformation-to-not-return-anything/79525/4 "2019-08-08T15:40:40Z")

</div>

You might be able to use something like [MQTT 2.5 M1+ How to implement the equivalent to MQTT1 REGEX filters](https://community.openhab.org/t/mqtt-2-5-m1-how-to-implement-the-equivalent-to-mqtt1-regex-filters/68350).

Use a REGEX to filter(s) out those messages that are not appropriate for the given Channel and only when they pass the REGEX filter(s) will it get passed to the JS or at that point JSONPATH transform may be sufficient.

> [@vivan](#):
>
> Not sure if I can chain one binding to another (my guess is guess not) and this will require me to re-implement the MQTT binding, actually duplicate 95% of it’s code.

Yes you can. This is exactly what rossko57 is describing in his second paragraph. What we don’t know is if MQTT is set up to support that though.

> [@vivan](#):
>
> Perhaps there is a way to chain multiple tranformations and abort in between in some way ?

See my link above. You must be running MQTT 2.5 M1 or later though.

---

_[View the full topic](https://community.openhab.org/t/how-to-get-js-transformation-to-not-return-anything/79525)._
