# Reference Expression Editor Value instead of string

**URL:** <https://community.n8n.io/t/reference-expression-editor-value-instead-of-string/16559>\
**Category:** Questions\
**Tags:** expressions\
**Created:** [August 10, 2022, 2:16pm UTC](https://community.n8n.io/t/reference-expression-editor-value-instead-of-string/16559 "2022-08-10T14:16:18Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![RedPacketSec](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/redpacketsec/32/17523_2.png) [@RedPacketSec](https://community.n8n.io/u/RedPacketSec)\
**Post date:** [August 10, 2022, 2:16pm UTC](https://community.n8n.io/t/reference-expression-editor-value-instead-of-string/16559/1 "2022-08-10T14:16:18Z")

</div>

How do i get n8n to return the number not the string that is being used in the top box? I need the result to show the same number as the result in the second screenshot

 ![image](https://europe1.discourse-cdn.com/n8n/original/2X/6/6c4a6680782bfa720f040208041ec6f107c3eca2.png)

Number Result

 ![image](https://europe1.discourse-cdn.com/n8n/original/2X/b/b63d2c200151343fc4802058b68142bddcb01b55.png)

---

<div class="post-metadata">

**Author:** ![BramKn](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/bramkn/32/11894_2.png) [@BramKn](https://community.n8n.io/u/BramKn)\
**Post date:** [August 10, 2022, 2:20pm UTC](https://community.n8n.io/t/reference-expression-editor-value-instead-of-string/16559/2 "2022-08-10T14:20:21Z")

</div>

Not sure what is happening here. But you can put a + sign in front of a string to convert it to a number. This should work in most cases. But I am confused at what I am looking at here. 😅

---

<div class="post-metadata">

**Author:** ![drudge](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/drudge/32/13097_2.png) [@drudge](https://community.n8n.io/u/drudge)\
**Post date:** [August 10, 2022, 2:23pm UTC](https://community.n8n.io/t/reference-expression-editor-value-instead-of-string/16559/3 "2022-08-10T14:23:44Z")

</div>

It looks like you are trying to pull out the expression from the parameter. If you want to return the value that expression resolves to, you’ll have to evaluate it using [`$evaluateExpression`](https://docs.n8n.io/code-examples/javascript-functions/methods/#evaluateexpressionexpression-string-itemindex-number).

---

<div class="post-metadata">

**Author:** ![BramKn](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/bramkn/32/11894_2.png) [@BramKn](https://community.n8n.io/u/BramKn)\
**Post date:** [August 10, 2022, 2:26pm UTC](https://community.n8n.io/t/reference-expression-editor-value-instead-of-string/16559/4 "2022-08-10T14:26:54Z")

</div>

awesome, learned something new. Thanks. 👍  
No idea where I would ever use this but we will see. 🙂

---

<div class="post-metadata">

**Author:** ![RedPacketSec](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/redpacketsec/32/17523_2.png) [@RedPacketSec](https://community.n8n.io/u/RedPacketSec)\
**Post date:** [August 11, 2022, 5:39am UTC](https://community.n8n.io/t/reference-expression-editor-value-instead-of-string/16559/5 "2022-08-11T05:39:23Z")

</div>

hmm i tried that and still am unable to get the result, its showing only the first character of the string, must be doing it wrong

---

<div class="post-metadata">

**Author:** ![RedPacketSec](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/redpacketsec/32/17523_2.png) [@RedPacketSec](https://community.n8n.io/u/RedPacketSec)\
**Post date:** [August 15, 2022, 4:45pm UTC](https://community.n8n.io/t/reference-expression-editor-value-instead-of-string/16559/6 "2022-08-15T16:45:17Z")

</div>

![image](https://europe1.discourse-cdn.com/n8n/original/3X/f/4/f4510cd69a31076a593d2f82cd52e1c3070f8751.png)

---

<div class="post-metadata">

**Author:** ![BramKn](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/bramkn/32/11894_2.png) [@BramKn](https://community.n8n.io/u/BramKn)\
**Post date:** [August 15, 2022, 4:57pm UTC](https://community.n8n.io/t/reference-expression-editor-value-instead-of-string/16559/7 "2022-08-15T16:57:49Z")

</div>

My best guess is this is caused by the [0] that is included in the expression. Can you test without?

---

<div class="post-metadata">

**Author:** ![RedPacketSec](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/redpacketsec/32/17523_2.png) [@RedPacketSec](https://community.n8n.io/u/RedPacketSec)\
**Post date:** [August 15, 2022, 4:58pm UTC](https://community.n8n.io/t/reference-expression-editor-value-instead-of-string/16559/8 "2022-08-15T16:58:52Z")

</div>

![image](https://europe1.discourse-cdn.com/n8n/original/3X/b/2/b2aa7c5b5edd3ed1721a2806d719b5e950c2a42a.png)

---

<div class="post-metadata">

**Author:** ![BramKn](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/bramkn/32/11894_2.png) [@BramKn](https://community.n8n.io/u/BramKn)\
**Post date:** [August 15, 2022, 5:01pm UTC](https://community.n8n.io/t/reference-expression-editor-value-instead-of-string/16559/9 "2022-08-15T17:01:24Z")

</div>

Ah sorry. Bad guess it was 😅

I looked back at he original question. Is there a way to simply remove the = from the data before doing this evaluate function?

---

<div class="post-metadata">

**Author:** ![RedPacketSec](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/redpacketsec/32/17523_2.png) [@RedPacketSec](https://community.n8n.io/u/RedPacketSec)\
**Post date:** [August 15, 2022, 5:10pm UTC](https://community.n8n.io/t/reference-expression-editor-value-instead-of-string/16559/10 "2022-08-15T17:10:53Z")

</div>

yeah, but doesnt help. tried that first

---

<div class="post-metadata">

**Author:** ![BramKn](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/bramkn/32/11894_2.png) [@BramKn](https://community.n8n.io/u/BramKn)\
**Post date:** [August 16, 2022, 6:52am UTC](https://community.n8n.io/t/reference-expression-editor-value-instead-of-string/16559/11 "2022-08-16T06:52:48Z")

</div>

Ok, so I had some time to actually try this out.  
Seems to work perfectly fine here.  
Can you share your workflow?
