# Get JSON response from TCP input

**URL:** https://discourse.nodered.org/t/get-json-response-from-tcp-input/34958
**Category:** General
**Created:** [28 October 2020 12:47 UTC](https://discourse.nodered.org/t/get-json-response-from-tcp-input/34958 "2020-10-28T12:47:28Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![sid99](https://avatars.discourse-cdn.com/v4/letter/s/6de8d8/32.png) [@sid99](https://discourse.nodered.org/u/sid99)
#### Post date: [28 October 2020 12:47 UTC](https://discourse.nodered.org/t/get-json-response-from-tcp-input/34958/1 "2020-10-28T12:47:29Z")

</div>

I need some help with how to convert an input received from a TCP input node to a JSON object in Node Red.  
I am using Logstash, which is tailing a csv file(which gets updated every 5 minutes) and then sending it to the TCP node in a Node Red flow. Using a CSV node after the TCP input node causes it generate the output in multiple lines rather than as a single JSON object.

What should be my approach to resolve this issue?

---

<div class="post-metadata">

### Author: ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)
#### Post date: [28 October 2020 15:29 UTC](https://discourse.nodered.org/t/get-json-response-from-tcp-input/34958/2 "2020-10-28T15:29:55Z")

</div>

Welcome to the forum @sid99.

Show us what the data coming in looks like in a debug node and tell us what you want it be converted to. When you say you want a JSON object I presume you mean a javascript object (a JSON object is a string).

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)
#### Post date: [27 December 2020 15:29 UTC](https://discourse.nodered.org/t/get-json-response-from-tcp-input/34958/3 "2020-12-27T15:29:59Z")

</div>

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