# Parse Request Response JSON

**URL:** <https://discourse.nodered.org/t/parse-request-response-json/81263>\
**Category:** General\
**Created:** [13 September 2023 06:28 UTC](https://discourse.nodered.org/t/parse-request-response-json/81263 "2023-09-13T06:28:48Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![shershah](https://avatars.discourse-cdn.com/v4/letter/s/da6949/32.png) [@shershah](https://discourse.nodered.org/u/shershah)\
**Post date:** [13 September 2023 06:28 UTC](https://discourse.nodered.org/t/parse-request-response-json/81263/1 "2023-09-13T06:28:48Z")

</div>

Hi, I have request json which contains multiple sensor details and parameter details. How can I parse the request json, update values on sensor and send the response back with success error status. I am doing it over TCP protocol using TCP request Node. Below is the sample request json. I have been trying to do it from couple of days but not able to do and blocked.  
Request JSON  
{  
"sensorList": [{  
"sensorId": "6131a8d409e2162ea1df532e",  
"protocol": "tcp",  
"paramList": [{  
"paramName": "voltage",  
"opValue": "220"  
}]  
},  
{  
"sensorId": "6131a8d409e2162ea1d423432e",  
"protocol": "tcp",  
"paramList": [{  
"paramName": "temp",  
"opValue": "220",  
}]  
}  
]  
}

Response JSON  
{  
"sensorList": [{  
"sensorId": "6131a8d409e2162ea1df532e",  
"protocol": "tcp",  
"paramList": [{  
"paramName": "voltage",  
"opValue": "220",  
"successCode":"",  
"errorCode":""  
}]  
},  
{  
"sensorId": "6131a8d409e2162ea1d423432e",  
"protocol": "tcp",  
"paramList": [{  
"paramName": "temp",  
"opValue": "220",  
"successCode":"",  
"errorCode":""  
}]  
}  
]  
}

Thanks in advance.

---

<div class="post-metadata">

**Author:** ![dynamicdave](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dynamicdave/32/96_2.png) [@dynamicdave](https://discourse.nodered.org/u/dynamicdave)\
**Post date:** [13 September 2023 06:33 UTC](https://discourse.nodered.org/t/parse-request-response-json/81263/2 "2023-09-13T06:33:39Z")

</div>

Sorry - I can't import your NR flow.  
Might be a good idea to read this and try again.

To export a Node-RED flow, you can use the built-in export feature, which allows you to save your flows as a JSON file. This JSON file can be imported into another Node-RED instance or shared with others. Here's how you can do it:

1. **Open Node-RED** : Make sure you have Node-RED running and access it through your web browser.

2. **Access the Node-RED Editor** : Open the Node-RED editor in your web browser by navigating to the appropriate URL (usually [http://localhost:1880](http://localhost:1880) or the URL of your Node-RED server).

3. **Select the Flow** : In the Node-RED editor, select the flow or flows that you want to export. You can click and drag your mouse to select multiple nodes or click on a blank space in the workspace to deselect any selected nodes.

4. **Open the Export Dialog** :

5. **Choose the Export Type** :

6. **Export to Clipboard** :

7. **Export to File** :

8. **Save the JSON File** :

Your Node-RED flow is now exported as a JSON file. You can share this file with others or import it into another Node-RED instance using the import feature. To import a flow, open the Node-RED editor, right-click on the workspace, and select "Import." Then, choose the JSON file you exported and follow the import instructions.

---

<div class="post-metadata">

**Author:** ![E1cid](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/e1cid/32/77971_2.png) [@E1cid](https://discourse.nodered.org/u/E1cid)\
**Post date:** [13 September 2023 06:37 UTC](https://discourse.nodered.org/t/parse-request-response-json/81263/3 "2023-09-13T06:37:24Z")

</div>

Please do not double post, it confuses the information for future readers. please continue on [NodeRed TCP OUT Node Success Response](https://discourse.nodered.org/t/nodered-tcp-out-node-success-response/81256)
