Building a Scalable JSON Schema Output Parser

Does anyone have any idea how to create a scalable JSON schema structured output parser? Because currently, expressions can’t be used in Node?

I’m working on an order confirmation workflow, and sometimes there is 1 product, and other times there are 20.

You could use a Function Node where you write JavaScript code to handle any number of products, instead of relying on static JSON schema or expressions inside nodes.

The Function Node can read the JSON input (order details), loop through the products array (whether it has 1 or 20 items) and then build a structured output dynamically, finally return the parsed data as an array or object for the next nodes