# Extract Data from Many Array With Object of Same name

**URL:** <https://discourse.nodered.org/t/extract-data-from-many-array-with-object-of-same-name/67355>\
**Category:** General\
**Created:** [5 September 2022 14:48 UTC](https://discourse.nodered.org/t/extract-data-from-many-array-with-object-of-same-name/67355 "2022-09-05T14:48:14Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Asad.Khan](https://avatars.discourse-cdn.com/v4/letter/a/e95f7d/32.png) [@Asad.Khan](https://discourse.nodered.org/u/Asad.Khan)\
**Post date:** [5 September 2022 14:48 UTC](https://discourse.nodered.org/t/extract-data-from-many-array-with-object-of-same-name/67355/1 "2022-09-05T14:48:14Z")

</div>

Hy! I am new to Node-red and java script, I need some help. I am using a WIFI node to know the WIFI strength of all the available networks. Some times I get one to two objects (networks), some times I get 10-15 (objects) based on network available. I only wants to read the signal\_level value of SSID of "TCF" (as i am connected to TCF wifi). How can I achieve this task? Is is possible to filter only TCF and ignore rest of SSID. Plus sometimes i have multiple objects with same TCF SSID name

 ![Capture](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/b/4/b4dde6e9646141e76341246f1fb341d04ae6c03c.png)

---

<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:** [5 September 2022 14:59 UTC](https://discourse.nodered.org/t/extract-data-from-many-array-with-object-of-same-name/67355/2 "2022-09-05T14:59:38Z")

</div>

In a change node you can set msg.payload, to jsonata(J:) `$$.payload[ssid = "TCF"]` . That should return all array objects where ssid equal "TCF".

Or  
`$$.payload[ssid = "TCF"].signal_level` would return the signal level e.g -58

You can do similar with filter() or find() in javascript.

---

<div class="post-metadata">

**Author:** ![Asad.Khan](https://avatars.discourse-cdn.com/v4/letter/a/e95f7d/32.png) [@Asad.Khan](https://discourse.nodered.org/u/Asad.Khan)\
**Post date:** [6 September 2022 08:41 UTC](https://discourse.nodered.org/t/extract-data-from-many-array-with-object-of-same-name/67355/7 "2022-09-06T08:41:55Z")

</div>

Sorry i made i mistake in the debug node. Now everything is working fine as you have mentioned in earlier. Thanks for your help.

 ![Node1.4](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/e/1/e113d5c199686c212631b327cecbd88fefb0f20a.png)

---

<div class="post-metadata">

**Author:** ![Asad.Khan](https://avatars.discourse-cdn.com/v4/letter/a/e95f7d/32.png) [@Asad.Khan](https://discourse.nodered.org/u/Asad.Khan)\
**Post date:** [6 September 2022 08:44 UTC](https://discourse.nodered.org/t/extract-data-from-many-array-with-object-of-same-name/67355/8 "2022-09-06T08:44:29Z")

</div>

[Wifi Final flow.json](https://discourse.nodered.org/uploads/short-url/iTMek39if4FKnmM3ei4CWWdm8Pt.json) (5.5 KB)

here is the flow, in case if anyone wants you use it in future

---

<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:** [5 November 2022 08:45 UTC](https://discourse.nodered.org/t/extract-data-from-many-array-with-object-of-same-name/67355/9 "2022-11-05T08:45:22Z")

</div>

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