The idea is:
Given a nested JavaScript object, the goal is to extract the object from a certain depth (path), without having to use the function node (a low-code way).
My use case:
For example, node Webhook always returns data like this:
If we only want to use the body, we have to use the node function (which is a problem for non-devs).
If using ItemList to extract the body, it actually throws an exception:
This simple pull-request allows the ItemList to extract data from the given path of both arrays and objects:
I think it would be beneficial to add this because:
Any resources to support this?
n8n-io:master
← luizeof:allow-item-list-split-object
opened 05:44AM - 03 Dec 21 UTC
Given a nested JavaScript object, the goal is to extract the object from a certa… in depth (path), without having to use the function node (a low-code form) and place it at the root:
For example, node Webhook always returns data like this:

If we only want to use the body, we have to use the node function (which is a problem for non-devs).
If using ItemList to extract the body, it actually throws an exception:

If we use Set, the result will put the items in a property (the goal is to put them at the root):

This pull request allows the ItemList to pull data from the given path from both arrays and objects by placing at the root (without a parent property):

Are you willing to work on this?
n8n-io:master
← luizeof:allow-item-list-split-object
opened 05:44AM - 03 Dec 21 UTC
Given a nested JavaScript object, the goal is to extract the object from a certa… in depth (path), without having to use the function node (a low-code form) and place it at the root:
For example, node Webhook always returns data like this:

If we only want to use the body, we have to use the node function (which is a problem for non-devs).
If using ItemList to extract the body, it actually throws an exception:

If we use Set, the result will put the items in a property (the goal is to put them at the root):

This pull request allows the ItemList to pull data from the given path from both arrays and objects by placing at the root (without a parent property):

+1 for my vote, but dont have any spare, but I logged a post about this literally 2 mins ago
For some JSON results, we get back nested arrays, some come back as nested objects etc
For the results that are not an array, it would be handy for the items list node to detect this and allow it to continue processing and splitting the data otherwise we get this:
[image]
And then need to whip out a function node to get the job done. Would be nicer if this node was a bit more robust with the data handling.
You can do that with the set node.
Example workflow
Not sure if the split item operation it’s the place for that.
@sirdavidoff
ideally, the list node should automagically be able to handle this
this can be an awful lot of manual work that isn’t suitable for large data sets, maybe its ok for one or two results