How to remove [Object from variable Selector

I was wondering how I can remove the [Object: ] from variable Selector.

desired result:

{

  • “call”:“ChangeClient”,*
  • “app_key”:123,*
  • “app_secret”:“98789879789879”,*
  • “param”:[*
  •  {*
    
  •     "code_cliente_i":123654,*
    
  •     "fullcode":1570215561976*
    
  •  }*
    
  • ]*
    }

{
  "nodes": [
    {
      "parameters": {},
      "name": "Start",
      "type": "n8n-nodes-base.start",
      "typeVersion": 1,
      "position": [
        250,
        300
      ]
    },
    {
      "parameters": {
        "functionCode": "return ([\n{json: {\n   \"call\":\"ChangeClient\",\n   \"app_key\": 123,\n   \"app_secret\": \"98789879789879\",\n   \"param\": [\n     {\n        \"code_cliente_i\": 123654, \n        \"fullcode\": 1570215561976,\n    }\n  ]\n}}]);\n"
      },
      "name": "Function",
      "type": "n8n-nodes-base.function",
      "typeVersion": 1,
      "position": [
        450,
        300
      ]
    },
    {
      "parameters": {
        "requestMethod": "POST",
        "url": "#",
        "jsonParameters": true,
        "options": {},
        "bodyParametersJson": "={{$node[\"Function\"].json}}"
      },
      "name": "HTTP Request",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 1,
      "position": [
        650,
        300
      ]
    }
  ],
  "connections": {
    "Start": {
      "main": [
        [
          {
            "node": "Function",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Function": {
      "main": [
        [
          {
            "node": "HTTP Request",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}

Hey @tuliovargas,

Quickest thing I can think of is to use {{JSON.stringify($node["Function"].json)}}

1 Like

Do you know another way without using “json.stringify”?

The “Object” it’s not sent. It’s the expression editor showing you what the expression resolves to.

1 Like

That is a very good and important point.

I also can’t think of another alternative that doesn’t involve having to write some crazy function.