# Destructuring http request response

**URL:** <https://community.n8n.io/t/destructuring-http-request-response/49002>\
**Category:** Questions\
**Tags:** node, http-request\
**Created:** [June 24, 2024, 6:30am UTC](https://community.n8n.io/t/destructuring-http-request-response/49002 "2024-06-24T06:30:51Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Andy-Slack](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/andy-slack/32/42465_2.png) [@Andy-Slack](https://community.n8n.io/u/Andy-Slack)\
**Post date:** [June 24, 2024, 6:30am UTC](https://community.n8n.io/t/destructuring-http-request-response/49002/1 "2024-06-24T06:30:51Z")

</div>

Hi Guys,

Is there an option to destructure http request responses, I could not find it via the HTTP Request node, but I wanted to double check before looking to add it.

At the moment, I believe we need to add additional nodes to “handle” API responses which don’t include the response data we want in the root object, for exmaple:

A simple solution would be to have an additional options option in the node called `Destructure` which would allow the user to specify the value in the object they want to return. In my example it could be `$json.users` which could return the users array.

This would mean my HTTP Response node returns the 3 users and not an object containing a users array.

Please let me know if there is already a solution inside the HTTP Response node I am not aware of or if you think this feature would be helpful.

---

<div class="post-metadata">

**Author:** ![n8n](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/n8n/32/196425_2.png) [@n8n](https://community.n8n.io/u/n8n)\
**Post date:** [June 24, 2024, 6:30am UTC](https://community.n8n.io/t/destructuring-http-request-response/49002/2 "2024-06-24T06:30:52Z")

</div>

It looks like your topic is missing some important information. Could you provide the following if applicable.

- **n8n version:**
- **Database (default: SQLite):**
- **n8n EXECUTIONS\_PROCESS setting (default: own, main):**
- **Running n8n via (Docker, npm, n8n cloud, desktop app):**
- **Operating system:**

---

<div class="post-metadata">

**Author:** ![ihortom](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/ihortom/32/11473_2.png) [@ihortom](https://community.n8n.io/u/ihortom)\
**Post date:** [June 24, 2024, 6:49pm UTC](https://community.n8n.io/t/destructuring-http-request-response/49002/3 "2024-06-24T18:49:40Z")

</div>

@Andy-Slack , **HTTP Request** node is meant to be generic. You would have to reference the data with the subsequent node. However, instead of **Code** node in your case I would use **Split Out** node.

---

<div class="post-metadata">

**Author:** ![Andy-Slack](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/andy-slack/32/42465_2.png) [@Andy-Slack](https://community.n8n.io/u/Andy-Slack)\
**Post date:** [June 24, 2024, 7:09pm UTC](https://community.n8n.io/t/destructuring-http-request-response/49002/4 "2024-06-24T19:09:34Z")

</div>

Thanks @ihortom that work’s perfectly!

---

<div class="post-metadata">

**Author:** ![system](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/system/32/195824_2.png) [@system](https://community.n8n.io/u/system)\
**Post date:** [July 1, 2024, 7:09pm UTC](https://community.n8n.io/t/destructuring-http-request-response/49002/5 "2024-07-01T19:09:42Z")

</div>

Closed on July 1, 2024, 7:09pm UTC

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