Jmespath representation in expression editor doesn't correspond to json being sent in HTTP node?

Describe the issue/error/question

Using a jmespath expression in the expression editor leads to double double-quotes despite single being sent.

I recently got side-tracked, when I looked at the expression editor output (“Result for item 1” e.g.) for an HTTP Request node’s json. I saw double double-quotes for strings and removed my original double-quotes from the expression editor, believing the jmespath expression included the double-quotes for strings, then resulting in a correct json representation in the below “result” pane.

The node was failing because of non-valid json. I double-checked the json being received at the endpoint and it was indeed invalid json because of missing quotes for string values. Adding them back in the expression editor fixed the issue despite the wrong representation in the bottom frame.

Here’s a screenshot of the expression editor’s two boxes:

Seeing the double quotes (highlighted in yellow) made me remove my quotes in the upper pane, resulting in invalid json being sent.

To avoid my error, maybe the calculated jmespath filter shouldn’t output quotes in the preview pane?

Btw: The json below the overview pane of the node shows the json as it is being sent but with large json output, it is truncated and therefore not always helpful to identify as invalid json if the culprit is later in the output. (Maybe a :hover with the entire json would be helpful here?)

Information on your n8n setup

  • n8n version: 0.213.0
  • Database you’re using (default: SQLite): mariadb
  • Running n8n with the execution process [own(default), main]: own
  • Running n8n via [Docker, npm, n8n.cloud, desktop app]: docker, self-hosted

p.s.: some information removed from screenshots.

Hey @sdsys,

Welcome to the community :raised_hands:

That is an interesting one, I would have expected no quotes to be the solution. I will add this to our product ideas list for the future, Thanks for reporting it.

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