# Websocket listen custom node

**URL:** <https://discourse.nodered.org/t/websocket-listen-custom-node/43551>\
**Category:** Developing Nodes\
**Created:** [2 April 2021 12:17 UTC](https://discourse.nodered.org/t/websocket-listen-custom-node/43551 "2021-04-02T12:17:12Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![jake123](https://avatars.discourse-cdn.com/v4/letter/j/ac8455/32.png) [@jake123](https://discourse.nodered.org/u/jake123)\
**Post date:** [2 April 2021 12:17 UTC](https://discourse.nodered.org/t/websocket-listen-custom-node/43551/1 "2021-04-02T12:17:13Z")

</div>

Hello. I would like to know how could i create a custom node which listenes to websocket server and outputs data that it listened to.For example I send some data to websocket like : `"SUBSCRIBE ......path-to-socket...."`. The result will then be =\> `NOTIFY ....path-to-socket....` and here after the path is the value. To extract the value i already know the function but i want to know how to implement thtat in node-red js file.

---

<div class="post-metadata">

**Author:** ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)\
**Post date:** [3 April 2021 21:57 UTC](https://discourse.nodered.org/t/websocket-listen-custom-node/43551/2 "2021-04-03T21:57:53Z")

</div>

What is wrong with the existing websocket node?

---

<div class="post-metadata">

**Author:** ![jake123](https://avatars.discourse-cdn.com/v4/letter/j/ac8455/32.png) [@jake123](https://discourse.nodered.org/u/jake123)\
**Post date:** [6 April 2021 06:47 UTC](https://discourse.nodered.org/t/websocket-listen-custom-node/43551/3 "2021-04-06T06:47:22Z")

</div>

The problem i have is that to reach the value of the data given back from websocket i must use a function node to reach it. I want to create a custom websocket node that will do the trimming and reach the value without having to use another node.

---

<div class="post-metadata">

**Author:** ![kuema](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/kuema/32/6542_2.png) [@kuema](https://discourse.nodered.org/u/kuema)\
**Post date:** [6 April 2021 07:19 UTC](https://discourse.nodered.org/t/websocket-listen-custom-node/43551/4 "2021-04-06T07:19:21Z")

</div>

Closing this one. That discussion is active over here: [Custom socket node](https://discourse.nodered.org/t/custom-socket-node/43553)
