# How to filter particular data from json file using python3 function node in Node-Red? Response for this is undefined

**URL:** <https://discourse.nodered.org/t/how-to-filter-particular-data-from-json-file-using-python3-function-node-in-node-red-response-for-this-is-undefined/77075>\
**Category:** General\
**Tags:** python-function-node\
**Created:** [30 March 2023 07:54 UTC](https://discourse.nodered.org/t/how-to-filter-particular-data-from-json-file-using-python3-function-node-in-node-red-response-for-this-is-undefined/77075 "2023-03-30T07:54:20Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sathish2409](https://avatars.discourse-cdn.com/v4/letter/s/4da419/32.png) [@Sathish2409](https://discourse.nodered.org/u/Sathish2409)\
**Post date:** [30 March 2023 07:54 UTC](https://discourse.nodered.org/t/how-to-filter-particular-data-from-json-file-using-python3-function-node-in-node-red-response-for-this-is-undefined/77075/1 "2023-03-30T07:54:20Z")

</div>

![Screenshot from 2023-03-30 13-23-46](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/d/9/d96a569eb9a529f62afca4f25f593b17e4ed217c.png)

---

<div class="post-metadata">

**Author:** ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)\
**Post date:** [30 March 2023 08:43 UTC](https://discourse.nodered.org/t/how-to-filter-particular-data-from-json-file-using-python3-function-node-in-node-red-response-for-this-is-undefined/77075/2 "2023-03-30T08:43:40Z")

</div>

Unfortunately you have provided zero details of which node you have used, what code you are running etc.

Also, filtering data in native node-red (JavaScript) will be easier and faster

---

<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:** [30 March 2023 08:45 UTC](https://discourse.nodered.org/t/how-to-filter-particular-data-from-json-file-using-python3-function-node-in-node-red-response-for-this-is-undefined/77075/3 "2023-03-30T08:45:44Z")

</div>

Welcome to the forum @Sathish2409

You need to give us more information. I presume the first output you show is what is coming out of the python node. If you click on contents you should be able to expand it so you can see what it there. The other thing you need to tell us is what information you are trying to filter out of it.

I presume that you are a beginner with node-red, so before replying I recommend watching this playlist: [Node-RED Essentials](https://www.youtube.com/playlist?list=PLyNBB9VCLmo1hyO-4fIZ08gqFcXBkHy-6). The videos are done by the developers of node-red. They're nice & short and to the point. You will understand a whole lot more in about 1 hour. A small investment for a lot of gain.

Pay particular attention to the section Working with Messages which should give you some clues on how to proceed.

---

<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:** [30 March 2023 08:46 UTC](https://discourse.nodered.org/t/how-to-filter-particular-data-from-json-file-using-python3-function-node-in-node-red-response-for-this-is-undefined/77075/4 "2023-03-30T08:46:42Z")

</div>

Hello and welcome to the forum.  
If you are using this node...  
 ![python3_A](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/5/3/530e2b18d25621664c7d396a6225077bc2a9ae65.png)  
 ![python3_B](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/4/a/4a2cda51f1ef7094ff41dbdb1f6d1989a9b27332.png)  
Do you realise it hasn't been updated for over 6 years??  
As @Steve-Mcl suggested, you need to provide more information as to what you are trying to achieve.

---

<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:** [30 March 2023 09:00 UTC](https://discourse.nodered.org/t/how-to-filter-particular-data-from-json-file-using-python3-function-node-in-node-red-response-for-this-is-undefined/77075/5 "2023-03-30T09:00:44Z")

</div>

I have moved this into the General category, as it is not about creating a new node type.

---

<div class="post-metadata">

**Author:** ![Sathish2409](https://avatars.discourse-cdn.com/v4/letter/s/4da419/32.png) [@Sathish2409](https://discourse.nodered.org/u/Sathish2409)\
**Post date:** [30 March 2023 09:08 UTC](https://discourse.nodered.org/t/how-to-filter-particular-data-from-json-file-using-python3-function-node-in-node-red-response-for-this-is-undefined/77075/7 "2023-03-30T09:08:25Z")

</div>

Thanks for the response @Colin

---

<div class="post-metadata">

**Author:** ![Sathish2409](https://avatars.discourse-cdn.com/v4/letter/s/4da419/32.png) [@Sathish2409](https://discourse.nodered.org/u/Sathish2409)\
**Post date:** [3 April 2023 12:19 UTC](https://discourse.nodered.org/t/how-to-filter-particular-data-from-json-file-using-python3-function-node-in-node-red-response-for-this-is-undefined/77075/8 "2023-04-03T12:19:41Z")

</div>

We are trying to perform ETL (trying to load data from one source and parse it and load in other resource).

---

<div class="post-metadata">

**Author:** ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)\
**Post date:** [3 April 2023 12:23 UTC](https://discourse.nodered.org/t/how-to-filter-particular-data-from-json-file-using-python3-function-node-in-node-red-response-for-this-is-undefined/77075/9 "2023-04-03T12:23:00Z")

</div>

Which Node-RED is perfectly capable of doing - so why are you using python?

---

<div class="post-metadata">

**Author:** ![Sathish2409](https://avatars.discourse-cdn.com/v4/letter/s/4da419/32.png) [@Sathish2409](https://discourse.nodered.org/u/Sathish2409)\
**Post date:** [3 April 2023 12:24 UTC](https://discourse.nodered.org/t/how-to-filter-particular-data-from-json-file-using-python3-function-node-in-node-red-response-for-this-is-undefined/77075/10 "2023-04-03T12:24:53Z")

</div>

I know only Python, not expertise in Javascript.

---

<div class="post-metadata">

**Author:** ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)\
**Post date:** [3 April 2023 12:36 UTC](https://discourse.nodered.org/t/how-to-filter-particular-data-from-json-file-using-python3-function-node-in-node-red-response-for-this-is-undefined/77075/11 "2023-04-03T12:36:26Z")

</div>

The point of node-red is a visual, no/low code environment.

You would do well to use you programming experience to learn the capabilities of node-red before jumping straight to python - it will really make things much easier (and cleaner and often faster) by staying "in-house" (so to speak)

There are plenty of people on the forum always willing to help out when you get stuck.

---

<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:** [17 April 2023 12:36 UTC](https://discourse.nodered.org/t/how-to-filter-particular-data-from-json-file-using-python3-function-node-in-node-red-response-for-this-is-undefined/77075/12 "2023-04-17T12:36:33Z")

</div>

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