How to remove JSON fields including sub fields from a 'Remove Duplicates' node

Please share your workflow

Share the output returned by the last node

How to use the Remove Duplicates node to filter the summaryInfo field and its sub fields? Help me

Information on your n8n setup

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

@wang.t.nice If you want to ignore the entire summaryInfo object when checking for duplicates, your current setup should work. Just ensure:

  • Keep summaryInfo in “Fields to Exclude”

  • This treats the whole object as excluded from comparison

Hi @wang.t.nice Just use code node to parse it using javascript or try “Set Field” node to remove that, i recommend Code Node for the control and ease. Hope this helps.

Hello!

One important clarification that may help others reading this:
the Remove Duplicates node only uses the selected fields during the comparison phase to decide whether two items are duplicates.

It does not modify the JSON structure of the surviving item.

This is why excluding summaryInfo works for deduplication, but the field still appears in the output. Field removal must be done explicitly with a Set or Code node.

1 Like

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