Parse Collection+JSON icon

Parse Collection+JSON

Parse Collection+JSON data to plain JSON Objects

Overview

This node parses data formatted in the Collection+JSON hypermedia type and converts it into plain JSON objects. It is useful when working with APIs or services that return responses in Collection+JSON format, allowing you to simplify and normalize the data for easier processing downstream in your workflow.

Common scenarios include:

  • Extracting and flattening API response data from Collection+JSON endpoints.
  • Removing hypermedia metadata (_links) if not needed.
  • Expanding collections of items into individual JSON objects for item-by-item processing.

For example, if an API returns a collection of user records wrapped in Collection+JSON, this node can convert that into a simple array of user objects or expand each user into separate items for further operations like filtering or transformation.

Properties

Name Meaning
Options A collection of additional options:
  Include Links Whether to include the _links metadata in the output JSON. If false, only the core data will be included. (Boolean, default: true)
  Expand Items Whether to expand the items array into individual JSON objects as separate output items. If false, the items remain as an array within one item. (Boolean, default: false)

Output

The node outputs JSON data structured as follows:

  • items: An array of objects representing the parsed data entries extracted from the Collection+JSON input.
  • page_info: Pagination or page-related metadata if present in the original Collection+JSON.
  • links: The _links metadata from the Collection+JSON, included only if the "Include Links" option is enabled.

If "Expand Items" is enabled, each object inside the items array is output as a separate item in the workflow, allowing individual processing per item.

No binary data output is produced by this node.

Dependencies

  • No external services or API keys are required.
  • The node operates purely on input data provided to it.
  • No special environment variables or n8n configurations are necessary.

Troubleshooting

  • Empty or missing collection property: If the input JSON does not contain a valid collection property, the node outputs empty items, page_info as null, and empty links. Ensure the input data conforms to the Collection+JSON format.
  • Unexpected output structure: Verify the "Include Links" and "Expand Items" options to understand how the output is shaped.
  • Large collections with "Expand Items" enabled: Expanding many items may increase execution time or memory usage. Consider disabling expansion if performance issues arise.

Links and References

Discussion