Output Strings being shown as an array of characters


I’m having trouble with a script that I’ve written prior to my last update (to version 0.199.0).

I’ll be vague, since they specifics doesn’t actually matter for this case. So, basically the script is intented to run over a bunch of alerts, and return uniq ids (since there are Alerts that are related to each other and have the same ID)…

In this case I’m using the new Code node to iterate over the objects that were returned by the previous node, and I’m adding all the Ids in an Array. At the end of the iteration, I execute a Set of said array and return it.

Today, I started noticing that the strings are being returned as an array of characters:

I tried to execute a Join, but isn’t recognized as a function… Tried to force a cast to String, but still the same. When I inspected the objects using the console, the variable is printed as a normal string… So, I don’t understand why this is being shown as an array of characters.

Disclaimer: I do code, but not in Node or JS, so this may be a simple problem and I apologize for that.

Kind regards,

Information on your n8n setup

  • n8n version: 0.199.0
  • Database you’re using: SQLite
  • Running n8n with the execution process: own
  • Running n8n via: npm

Hi @robjennings, I am sorry to hear you are having trouble. Without knowing the workflow it’s hard to help tbh. Perhaps you can share the JSON data you currently have, and the JSON data you would like to have instead and the node you are using for the conversion?