# How read array?

**URL:** <https://discourse.nodered.org/t/how-read-array/74948>\
**Category:** General\
**Created:** [9 February 2023 16:39 UTC](https://discourse.nodered.org/t/how-read-array/74948 "2023-02-09T16:39:23Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Elberto](https://avatars.discourse-cdn.com/v4/letter/e/b19c9b/32.png) [@Elberto](https://discourse.nodered.org/u/Elberto)\
**Post date:** [9 February 2023 16:39 UTC](https://discourse.nodered.org/t/how-read-array/74948/1 "2023-02-09T16:39:23Z")

</div>

Hi to all! I apologize but I am still newbie about nred...

I need to display data on map, so I started reading data from sqlite table.  
I can correctly query my table using function but output is:

```auto
array[38]
0: object
 name: "kjh"
 lat: "12.433"
 lon: "12.444"

1: object....

```

I don't understand how read all array elements and send data to map, how can I create output msg for every element?  
Thanks.

---

<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:** [9 February 2023 17:05 UTC](https://discourse.nodered.org/t/how-read-array/74948/2 "2023-02-09T17:05:38Z")

</div>

> [@Elberto](#):
>
> how can I create output msg for every element?

If you send it through a Split node it will split it into 38 messages, each containing one element from the array.

---

<div class="post-metadata">

**Author:** ![Elberto](https://avatars.discourse-cdn.com/v4/letter/e/b19c9b/32.png) [@Elberto](https://discourse.nodered.org/u/Elberto)\
**Post date:** [10 February 2023 14:04 UTC](https://discourse.nodered.org/t/how-read-array/74948/3 "2023-02-10T14:04:47Z")

</div>

Ok, thanks, I supposed to work with Split node but I thought it was wrong due I read "separator" field...

---

<div class="post-metadata">

**Author:** ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)\
**Post date:** [10 February 2023 15:43 UTC](https://discourse.nodered.org/t/how-read-array/74948/4 "2023-02-10T15:43:40Z")

</div>

actually node-red-contrib-web-worldmap would probably take that array as-is and display all the points 🙂

---

<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:** [11 April 2023 15:44 UTC](https://discourse.nodered.org/t/how-read-array/74948/5 "2023-04-11T15:44:05Z")

</div>

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