# Retrieving Items from previous nodes

**URL:** <https://community.n8n.io/t/retrieving-items-from-previous-nodes/35782>\
**Category:** Questions\
**Tags:** data-transformation, workflow-building\
**Created:** [January 24, 2024, 10:13am UTC](https://community.n8n.io/t/retrieving-items-from-previous-nodes/35782 "2024-01-24T10:13:14Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![Trash](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/trash/32/29983_2.png) [@Trash](https://community.n8n.io/u/Trash)\
**Post date:** [January 24, 2024, 5:06pm UTC](https://community.n8n.io/t/retrieving-items-from-previous-nodes/35782/4 "2024-01-24T17:06:03Z")

</div>

Im running the latest version of n8n on cloudron. Unfortunately I cant share the data but I dont think that matters here. Ive seen here

> [@Function Node: Access all items from previous node output](http://community.n8n.io/t/function-node-access-all-items-from-previous-node-output/3050):
>
> I have a Workflow that goes something like this: Run Get Tasks: HTTP Request Filter Tasks: Function Get Folders: HTTP Request Filter Folders: Function Combine Tasks and Folders: Function In step 6, I need to use the output from both 5 and 3. 5 is just items, so that’s fine. But, I’m having trouble getting all of the output from 3. I’ve tried $node["Filter Tasks"].json which only gives me the first item. I’ve also tried $item(0).$node["Filter Tasks"].json, which gives me the same thing. $item…

that this function

```auto
const allItems = $items("Filter Tasks");

```

should output all the items in the split out node but it returns this error instead

```auto
ERROR: Code doesn't return an object [item 0]
Please return an object representing the output item. ('undefined' was returned instead.)

```

---

_[View the full topic](https://community.n8n.io/t/retrieving-items-from-previous-nodes/35782)._
