# Help with expressions

**URL:** <https://community.n8n.io/t/help-with-expressions/5378>\
**Category:** Questions\
**Created:** [April 21, 2021, 3:26pm UTC](https://community.n8n.io/t/help-with-expressions/5378 "2021-04-21T15:26:04Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![dsuresh](https://avatars.discourse-cdn.com/v4/letter/d/53a042/32.png) [@dsuresh](https://community.n8n.io/u/dsuresh)\
**Post date:** [April 21, 2021, 3:26pm UTC](https://community.n8n.io/t/help-with-expressions/5378/1 "2021-04-21T15:26:05Z")

</div>

Hi,

How do I convert thru expression?  
from  
[Object: {“filename”:“SDU.DAT”}]  
to  
{“receipts”: {“filename”: “SDU.DAT”}}

---

<div class="post-metadata">

**Author:** ![RicardoE105](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/ricardoe105/32/550_2.png) [@RicardoE105](https://community.n8n.io/u/RicardoE105)\
**Post date:** [April 21, 2021, 3:32pm UTC](https://community.n8n.io/t/help-with-expressions/5378/2 "2021-04-21T15:32:45Z")

</div>

Can you share the expression you are currently using? What you showed us it’s what the expression is resolving to.

---

<div class="post-metadata">

**Author:** ![dsuresh](https://avatars.discourse-cdn.com/v4/letter/d/53a042/32.png) [@dsuresh](https://community.n8n.io/u/dsuresh)\
**Post date:** [April 21, 2021, 3:46pm UTC](https://community.n8n.io/t/help-with-expressions/5378/3 "2021-04-21T15:46:09Z")

</div>

{{$node[“Function”].json[“receipts”]}}

---

<div class="post-metadata">

**Author:** ![RicardoE105](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/ricardoe105/32/550_2.png) [@RicardoE105](https://community.n8n.io/u/RicardoE105)\
**Post date:** [April 21, 2021, 4:45pm UTC](https://community.n8n.io/t/help-with-expressions/5378/4 "2021-04-21T16:45:42Z")

</div>

You can do: {{ { “receipts”: $node[“Function”].json[“receipts”] } }}

```
{
  "nodes": [
    {
      "parameters": {},
      "name": "Start",
      "type": "n8n-nodes-base.start",
      "typeVersion": 1,
      "position": [
        250,
        300
      ]
    },
    {
      "parameters": {
        "requestMethod": "POST",
        "url": "https://webhook.site/0054b04d-2ae2-4461-805d-4d2800b6f51e",
        "jsonParameters": true,
        "options": {},
        "bodyParametersJson": "={{ { \"receipts\": $node[\"Function\"].json[\"receipts\"] } }}"
      },
      "name": "HTTP Request",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 1,
      "position": [
        740,
        300
      ]
    },
    {
      "parameters": {
        "functionCode": "return [\n {\n json: {\n receipts: {\n name: 'aaaa`'\n }\n }\n }\n]"
      },
      "name": "Function",
      "type": "n8n-nodes-base.function",
      "typeVersion": 1,
      "position": [
        460,
        300
      ]
    }
  ],
  "connections": {
    "Start": {
      "main": [
        [
          {
            "node": "Function",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Function": {
      "main": [
        [
          {
            "node": "HTTP Request",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
```

---

<div class="post-metadata">

**Author:** ![dsuresh](https://avatars.discourse-cdn.com/v4/letter/d/53a042/32.png) [@dsuresh](https://community.n8n.io/u/dsuresh)\
**Post date:** [April 21, 2021, 7:45pm UTC](https://community.n8n.io/t/help-with-expressions/5378/5 "2021-04-21T19:45:00Z")

</div>

Hi Ricardo,

Even with this solution I am getting the following result to be passed to the next node.

[Object: {“receipts”:{“name”:“aaaa`”}}]

What I need is without Object i.e. {“receipts”:{“name”:“aaaa`”}}

---

<div class="post-metadata">

**Author:** ![RicardoE105](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/ricardoe105/32/550_2.png) [@RicardoE105](https://community.n8n.io/u/RicardoE105)\
**Post date:** [April 21, 2021, 7:49pm UTC](https://community.n8n.io/t/help-with-expressions/5378/6 "2021-04-21T19:49:13Z")

</div>

Do not worry about that. It’s just the expression editor telling you that is resolving to an object. But that it’s not being passed.

---

<div class="post-metadata">

**Author:** ![dsuresh](https://avatars.discourse-cdn.com/v4/letter/d/53a042/32.png) [@dsuresh](https://community.n8n.io/u/dsuresh)\
**Post date:** [April 21, 2021, 7:59pm UTC](https://community.n8n.io/t/help-with-expressions/5378/7 "2021-04-21T19:59:53Z")

</div>

Problem is I am calling flask API with result of expression, its not able to recognize JSON input, It is working if I manually remove and send static input. Anyway we can send plain text without [Object in there?

---

<div class="post-metadata">

**Author:** ![RicardoE105](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/ricardoe105/32/550_2.png) [@RicardoE105](https://community.n8n.io/u/RicardoE105)\
**Post date:** [April 21, 2021, 8:01pm UTC](https://community.n8n.io/t/help-with-expressions/5378/8 "2021-04-21T20:01:36Z")

</div>

Are you using the HTTP node? if so can you show me how you are using it?

---

<div class="post-metadata">

**Author:** ![dsuresh](https://avatars.discourse-cdn.com/v4/letter/d/53a042/32.png) [@dsuresh](https://community.n8n.io/u/dsuresh)\
**Post date:** [April 21, 2021, 8:04pm UTC](https://community.n8n.io/t/help-with-expressions/5378/9 "2021-04-21T20:04:48Z")

</div>

BodyContentType as JSON, JSON/Raw is checked, POST call, sending expression result as Body parameter

---

<div class="post-metadata">

**Author:** ![RicardoE105](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/ricardoe105/32/550_2.png) [@RicardoE105](https://community.n8n.io/u/RicardoE105)\
**Post date:** [April 21, 2021, 8:18pm UTC](https://community.n8n.io/t/help-with-expressions/5378/10 "2021-04-21T20:18:22Z")

</div>

In the example that I sent you above, I did exactly that. Just run it and go [here](https://webhook.site/#!/0054b04d-2ae2-4461-805d-4d2800b6f51e/6e912434-2f64-4c43-926f-c532596decdf/1) to see the request.

Added the workflow again below.

```
{
  "nodes": [
    {
      "parameters": {},
      "name": "Start",
      "type": "n8n-nodes-base.start",
      "typeVersion": 1,
      "position": [
        250,
        300
      ]
    },
    {
      "parameters": {
        "requestMethod": "POST",
        "url": "https://webhook.site/0054b04d-2ae2-4461-805d-4d2800b6f51e",
        "jsonParameters": true,
        "options": {},
        "bodyParametersJson": "={{ { \"receipts\": $node[\"Function\"].json[\"receipts\"] } }}"
      },
      "name": "HTTP Request",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 1,
      "position": [
        800,
        300
      ]
    },
    {
      "parameters": {
        "functionCode": "return [\n {\n json: {\n receipts: {\n name: 'aaaa`'\n }\n }\n }\n]"
      },
      "name": "Function",
      "type": "n8n-nodes-base.function",
      "typeVersion": 1,
      "position": [
        520,
        300
      ]
    }
  ],
  "connections": {
    "Start": {
      "main": [
        [
          {
            "node": "Function",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Function": {
      "main": [
        [
          {
            "node": "HTTP Request",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
```

---

<div class="post-metadata">

**Author:** ![dsuresh](https://avatars.discourse-cdn.com/v4/letter/d/53a042/32.png) [@dsuresh](https://community.n8n.io/u/dsuresh)\
**Post date:** [April 21, 2021, 8:27pm UTC](https://community.n8n.io/t/help-with-expressions/5378/11 "2021-04-21T20:27:04Z")

</div>

Thank you so much Ricardo, appreciate your patience. Its working now. I had to change program slightly, now it works with the way you sent.

---

<div class="post-metadata">

**Author:** ![RicardoE105](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/ricardoe105/32/550_2.png) [@RicardoE105](https://community.n8n.io/u/RicardoE105)\
**Post date:** [April 21, 2021, 8:28pm UTC](https://community.n8n.io/t/help-with-expressions/5378/12 "2021-04-21T20:28:11Z")

</div>

Glad that it worked. Have fun.
