# \[Feature Request\]Allow one-liner JavaScript as well as JSONata

**URL:** https://discourse.nodered.org/t/feature-request-allow-one-liner-javascript-as-well-as-jsonata/82825
**Category:** Feature Requests
**Created:** [13 November 2023 11:47 UTC](https://discourse.nodered.org/t/feature-request-allow-one-liner-javascript-as-well-as-jsonata/82825 "2023-11-13T11:47:51Z")
**Posts on this page:** 1
**Showing post:** 40

<div class="post-metadata">

### Author: ![ralphwetzel](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/ralphwetzel/32/53713_2.png) [@ralphwetzel](https://discourse.nodered.org/u/ralphwetzel)
#### Post date: [14 November 2023 22:40 UTC](https://discourse.nodered.org/t/feature-request-allow-one-liner-javascript-as-well-as-jsonata/82825/40 "2023-11-14T22:40:55Z")

</div>

> [@dceejay](#):
>
> But once you start allowing function definitions then why not use a function node that you can at least document rather than hide behind one line ?

I'm pretty convinced, you can do crazy stuff with JSONata as well. People don't do this (usually) not because they're unfamiliar with JSONata, but because it's _crazy stuff_. On the other hand it feels very convenient to write a small function to process a value _in-line_ within a `change` node.  
Not sure yet that I get your point regarding documentation. Of course there's the standard JS editor opening when you press the `...` button. Agreed, the script doesn't look too nice in the small `input` box - as does a JSON structure or longer JSONata statement. Once we've clarified the 'if', there'll be time to investigate the best way to represent things...

> [@dceejay](#):
>
> And do you then allow node.warn for debugging etc…

Functionality can always be discussed. Yet ... why shouldn't that be possible and helpful?

---

_[View the full topic](https://discourse.nodered.org/t/feature-request-allow-one-liner-javascript-as-well-as-jsonata/82825)._
