# Switch Nodes - Regex

**URL:** <https://discourse.nodered.org/t/switch-nodes-regex/66628>\
**Category:** General\
**Created:** [19 August 2022 00:21 UTC](https://discourse.nodered.org/t/switch-nodes-regex/66628 "2022-08-19T00:21:53Z")\
**Posts on this page:** 1\
**Showing post:** 10

<div class="post-metadata">

**Author:** ![craigcurtin](https://avatars.discourse-cdn.com/v4/letter/c/94ad74/32.png) [@craigcurtin](https://discourse.nodered.org/u/craigcurtin)\
**Post date:** [21 August 2022 01:18 UTC](https://discourse.nodered.org/t/switch-nodes-regex/66628/10 "2022-08-21T01:18:50Z")

</div>

@shrickus OK what you had sort of works for me - but what i wanted to do was reference the property as a Global Context object - the reason being that i could then reference multiple values in the tests such as Sun (to match all the sun conditions), Cloud to match all the cloud conditions etc

Using your suggestion it appears i can only do a True/False test ? And so would have to cascade multiple switch nodes for that to work ?

Now i have done a search and @knolleary had responded that this was not the behaviour he was expecting - in this thread - [Problem with global json object variable and JSONata switch decision - #4 by knolleary](https://discourse.nodered.org/t/problem-with-global-json-object-variable-and-jsonata-switch-decision/27361/4)

i am wondering if that has been resolved now - does the switch node still ignore what is in the Property field if i reference a Global/Flow context variable and i have to build up the whole jsonata in the test rules - or is this now resolved ?

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/b/f/bf1285c57b33b66d0be5688ac680d3a69b7e0db6.png)

Craig

---

_[View the full topic](https://discourse.nodered.org/t/switch-nodes-regex/66628)._
