# JSONata Expression Editor - enable testing of context ($flowContext and $globalContext)

**URL:** <https://discourse.nodered.org/t/jsonata-expression-editor-enable-testing-of-context-flowcontext-and-globalcontext/36136>\
**Category:** Feature Requests\
**Created:** [18 November 2020 13:13 UTC](https://discourse.nodered.org/t/jsonata-expression-editor-enable-testing-of-context-flowcontext-and-globalcontext/36136 "2020-11-18T13:13:02Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![janvda](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/janvda/32/234_2.png) [@janvda](https://discourse.nodered.org/u/janvda)\
**Post date:** [18 November 2020 13:13 UTC](https://discourse.nodered.org/t/jsonata-expression-editor-enable-testing-of-context-flowcontext-and-globalcontext/36136/1 "2020-11-18T13:13:02Z")

</div>

The JSONata expression editor is a great tool for testing JSONata expressions.

It would be good if this tool could be extended to test expressions using the context functions (`$flowContext()` and `$globalContext()`).

The idea is that the JSONata expression editor is using the actual context values (as shown in the context window) for the calucation of the result in the Result window.

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/5/3/53e216df755305dd241eb581927aef03414cb474.png)

So for the above example: the Result window should not say:

```auto
Cannot test context functions
 $flowContext or $globalContext

```

but

```auto
ring not logged in slack channel as ring_counts_this_day = 0

```

So the subexpression `$flowContext('ring_counts_this_day')` becomes `0` as this is the current value displayed in the context tab for that context variable.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [17 January 2021 13:13 UTC](https://discourse.nodered.org/t/jsonata-expression-editor-enable-testing-of-context-flowcontext-and-globalcontext/36136/2 "2021-01-17T13:13:17Z")

</div>

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.
