Inconsistent behavior of aggregator

Describe the problem/error/question

I am new to N8N, literally, only finished lesson 1 this morning and now is doing lesson 2, but I am a software enginner. When I am playing with the split out node and the aggregator node, doing this exercise:

  1. Use the HTTP Request node to make a GET request to the Quotable API https://api.quotable.io/quotes. (This API requires no authentication).
  2. Transform the data in the results field with the Split Out node.
  3. Transform the data in the results field with the Code node.
    I notice the inconsistence of inner object aggregation. in this instance is the tags object within each Quote object. Here is a screen shot:

    In this screen shot, you see that its a Code node that is trying to aggregator all the quote into a single object. and the first object’s tags are return as an empty array, yet the second object has the tags object parsed correctly.

What is the error message (if any)?

Initially, thought it might be the case of different size of array for the tags objects, however, by scrolling through, here is another tags that has 4 items:

in the above two images, we can see some are parsed out and yet some are not parsed out. I mean the tags within the quote object.

the images shown is the result of using the Code module, howeve, using the Aggregate module gives the same result.

Please share your workflow

Share the output returned by the last node

Information on your n8n setup

  • **n8n version:**1.55.3
  • **Database (default: SQLite):**postgres
  • n8n EXECUTIONS_PROCESS setting (default: own, main):
  • Running n8n via (Docker, npm, n8n cloud, desktop app): n8n docker
  • **Operating system:**ubuntu

@dishui , I believe your confusion comes about due to misinterpretation. The input/output has three views:

  1. Schema
  2. Table
  3. JSON

You are comparing data coming from different views, namely “Schema” vs “Table”. If both - input and output - are switched, say, to “Table” view, there will be no inconsistency.

“Schema” is used to depict the structure of the data, not the data as such.

1 Like

I see. I checked it and see that the schema view also has example data in it. that is the source of confusion.

1 Like

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