# Issue with extracting information out of an object array

**URL:** <https://discourse.nodered.org/t/issue-with-extracting-information-out-of-an-object-array/61373>\
**Category:** General\
**Created:** [16 April 2022 18:06 UTC](https://discourse.nodered.org/t/issue-with-extracting-information-out-of-an-object-array/61373 "2022-04-16T18:06:41Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Fabian911](https://avatars.discourse-cdn.com/v4/letter/f/aca169/32.png) [@Fabian911](https://discourse.nodered.org/u/Fabian911)\
**Post date:** [16 April 2022 18:06 UTC](https://discourse.nodered.org/t/issue-with-extracting-information-out-of-an-object-array/61373/1 "2022-04-16T18:06:41Z")

</div>

Hello guys,  
I have a little trouble withextracting an information out of the last object of an array. I've just copied the path out of the debug but it doesnt work either. Would be nice if somebody could help! 🙂

the error message that pops up is "TypeError: Cannot read property 'title' of undefined"

 ![2](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/2/4/24e5eec90e4f093824fa52c1a4005b479a287aec.png)  
 ![3](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/5/4/54305bb16657b32623c88cc4eced8cd247f6fa6e.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:** [16 April 2022 18:20 UTC](https://discourse.nodered.org/t/issue-with-extracting-information-out-of-an-object-array/61373/2 "2022-04-16T18:20:49Z")

</div>

The `count` var is set to an object `payload`, so the count is at `count.payload`.  
The error is object -1 reults in NaN, so JS is looking for a title in the property NaN.

`stichwort` is set to an object `payload`, so your include would be on `stichwort.payload`, which would contains the originals object array element 1 title value, if the count was correct.

---

<div class="post-metadata">

**Author:** ![Sean-McG](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/sean-mcg/32/54677_2.png) [@Sean-McG](https://discourse.nodered.org/u/Sean-McG)\
**Post date:** [16 April 2022 18:26 UTC](https://discourse.nodered.org/t/issue-with-extracting-information-out-of-an-object-array/61373/3 "2022-04-16T18:26:02Z")

</div>

Darn! beat me to it again 😉

---

<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:** [30 April 2022 18:26 UTC](https://discourse.nodered.org/t/issue-with-extracting-information-out-of-an-object-array/61373/4 "2022-04-30T18:26:03Z")

</div>

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