# Split Array and Objects

**URL:** <https://discourse.nodered.org/t/split-array-and-objects/68173>\
**Category:** General\
**Created:** [24 September 2022 11:00 UTC](https://discourse.nodered.org/t/split-array-and-objects/68173 "2022-09-24T11:00:58Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![MrThiemann](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/mrthiemann/32/68063_2.png) [@MrThiemann](https://discourse.nodered.org/u/MrThiemann)\
**Post date:** [24 September 2022 11:00 UTC](https://discourse.nodered.org/t/split-array-and-objects/68173/1 "2022-09-24T11:00:58Z")

</div>

Hy,  
i have a HTTP request that gives me several arrays with objects.  
payload.List.Item[0], payload.List.Item[1], payload.List.Item[2].....

How to split those objects from all arrays into single requests?

I need from each array the payload.List.Item[0].Active

Thank you!

 ![Bildschirmfoto 2022-09-24 um 12.52.58](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/4/e/4e20ada56c400c9585129e5d2fdb13dea8c34a1a.png)

 ![Bildschirmfoto 2022-09-24 um 07.52.18](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/9/0/90ce9bcf1ce5df437ce54ea729b812be5d801cc5.png)

---

<div class="post-metadata">

**Author:** ![ghayne](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/ghayne/32/39_2.png) [@ghayne](https://discourse.nodered.org/u/ghayne)\
**Post date:** [24 September 2022 11:16 UTC](https://discourse.nodered.org/t/split-array-and-objects/68173/2 "2022-09-24T11:16:41Z")

</div>

Welcome to the forum!

This guide will help you get an understanding of the path to objects in an array.

[https://nodered.org/docs/user-guide/messages](https://nodered.org/docs/user-guide/messages)

---

<div class="post-metadata">

**Author:** ![MrThiemann](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/mrthiemann/32/68063_2.png) [@MrThiemann](https://discourse.nodered.org/u/MrThiemann)\
**Post date:** [24 September 2022 11:46 UTC](https://discourse.nodered.org/t/split-array-and-objects/68173/3 "2022-09-24T11:46:32Z")

</div>

thanks for your answer =)  
I know the site.  
if I want to "filter" a single array, then I know how to do it.  
I just don't understand how to use this when I have multiple objects  
[0 … 9]  
[10 … 19]  
[20 … 29]  
.....

I just want to filter for all "active".

payload.List.Item[0].Active[0] == 1  
payload.List.Item[2].Active[0] == 1  
payload.List.Item[8].Active[0] == 1

I can't create a switch node for each individual object?!

---

<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:** [24 September 2022 12:01 UTC](https://discourse.nodered.org/t/split-array-and-objects/68173/4 "2022-09-24T12:01:45Z")

</div>

> [@MrThiemann](#):
>
> payload.List.Item[0].Active[0] == 1

In a change node set msg.payload  
to JSONata J: `$$.payload.List.Item[Active[0] = "1"]`

Which should return payload, with an array of objects where active[0] = "1"  
Which you can feed in to a split node to get separate payload objects.

---

<div class="post-metadata">

**Author:** ![MrThiemann](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/mrthiemann/32/68063_2.png) [@MrThiemann](https://discourse.nodered.org/u/MrThiemann)\
**Post date:** [24 September 2022 19:11 UTC](https://discourse.nodered.org/t/split-array-and-objects/68173/5 "2022-09-24T19:11:08Z")

</div>

Amazing!!!! Thank you!

now only the "active ones" are shown to me!  
after that I would now set a "split-node" so that they are listed individually.

if I want to evaluate the payload so that ONLY the host name is displayed to me.... do you have an idea for this?  
**payload.HostName[0]**  
so that I have them all in a "list" again? (Or does this belong in a separate thread?)

---

<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:** [24 September 2022 19:32 UTC](https://discourse.nodered.org/t/split-array-and-objects/68173/6 "2022-09-24T19:32:29Z")

</div>

Your question is ambiguous, I will take a guess, but if wrong please supply more info

`$$.payload.List.Item[Active[0] = "1"].Hostname[0]` should return alist of hostnames before the split.

After the split `msg.payload.HostName[0] ` would hold the individual hostnames of each split message.

---

<div class="post-metadata">

**Author:** ![MrThiemann](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/mrthiemann/32/68063_2.png) [@MrThiemann](https://discourse.nodered.org/u/MrThiemann)\
**Post date:** [24 September 2022 19:45 UTC](https://discourse.nodered.org/t/split-array-and-objects/68173/7 "2022-09-24T19:45:02Z")

</div>

ambiguous 🥴 sorry...

`$$.payload.List.Item[Active[0] = "1"].Hostname[0]`  
If I then filter (i.e. I replace this with the one from your previous message) then the result I get is: undefined

I'll try to explain it to you even better.... but what do you need to know?

---

<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:** [24 September 2022 19:50 UTC](https://discourse.nodered.org/t/split-array-and-objects/68173/8 "2022-09-24T19:50:54Z")

</div>

Always best to supply input data, in a copyable form, and example test flow with input data in an inject node, as we do not have your data. any error messages. Then we can see what you are trying and offer an example flow back. We only require 3 elements of your input array, not the whole thing.

---

<div class="post-metadata">

**Author:** ![MrThiemann](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/mrthiemann/32/68063_2.png) [@MrThiemann](https://discourse.nodered.org/u/MrThiemann)\
**Post date:** [24 September 2022 19:53 UTC](https://discourse.nodered.org/t/split-array-and-objects/68173/9 "2022-09-24T19:53:40Z")

</div>

if you can start something like that with it, that would be great... but it's probably a config that not everyone uses...

```auto
[
    {
        "id": "af13048d4c5fc875",
        "type": "inject",
        "z": "9e0ebf9d.29a6c",
        "name": "",
        "props": [
            {
                "p": "payload"
            },
            {
                "p": "topic",
                "vt": "str"
            }
        ],
        "repeat": "",
        "crontab": "",
        "once": false,
        "onceDelay": 0.1,
        "topic": "",
        "payload": "",
        "payloadType": "date",
        "x": 1580,
        "y": 4440,
        "wires": [
            [
                "fb035b3a04461cab"
            ]
        ]
    },
    {
        "id": "fb035b3a04461cab",
        "type": "fritzbox-in",
        "z": "9e0ebf9d.29a6c",
        "device": "61f053c7.62e594",
        "name": "",
        "service": "urn:dslforum-org:service:Hosts:1",
        "action": "X_AVM-DE_GetHostListPath",
        "arguments": "{}",
        "x": 1750,
        "y": 4440,
        "wires": [
            [
                "ed8e4aceedc1825f"
            ]
        ]
    },
    {
        "id": "ed8e4aceedc1825f",
        "type": "change",
        "z": "9e0ebf9d.29a6c",
        "name": "",
        "rules": [
            {
                "t": "set",
                "p": "url",
                "pt": "msg",
                "to": "\"http://192.168.178.1:49000\" & payload.\"NewX_AVM-DE_HostListPath\"",
                "tot": "jsonata"
            },
            {
                "t": "delete",
                "p": "payload",
                "pt": "msg"
            }
        ],
        "action": "",
        "property": "",
        "from": "",
        "to": "",
        "reg": false,
        "x": 1930,
        "y": 4440,
        "wires": [
            [
                "7b5e7201d2d5feb5"
            ]
        ]
    },
    {
        "id": "7b5e7201d2d5feb5",
        "type": "http request",
        "z": "9e0ebf9d.29a6c",
        "name": "",
        "method": "GET",
        "ret": "txt",
        "paytoqs": "ignore",
        "url": "",
        "tls": "",
        "persist": false,
        "proxy": "",
        "authType": "",
        "senderr": false,
        "headers": [],
        "x": 2110,
        "y": 4440,
        "wires": [
            [
                "86013a34ab79cd68"
            ]
        ]
    },
    {
        "id": "86013a34ab79cd68",
        "type": "xml",
        "z": "9e0ebf9d.29a6c",
        "name": "",
        "property": "payload",
        "attr": "",
        "chr": "",
        "x": 2250,
        "y": 4440,
        "wires": [
            [
                "bd36ce309c7bac12",
                "910fd97075f98887",
                "a5ea3096d0529acc"
            ]
        ]
    },
    {
        "id": "bd36ce309c7bac12",
        "type": "debug",
        "z": "9e0ebf9d.29a6c",
        "name": "",
        "active": false,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "payload",
        "targetType": "msg",
        "statusVal": "",
        "statusType": "auto",
        "x": 2410,
        "y": 4440,
        "wires": []
    },
    {
        "id": "4ae45f9a0bc91f0f",
        "type": "split",
        "z": "9e0ebf9d.29a6c",
        "name": "",
        "splt": "\\n",
        "spltType": "str",
        "arraySplt": 1,
        "arraySpltType": "len",
        "stream": true,
        "addname": "payload.hits",
        "x": 2430,
        "y": 4620,
        "wires": [
            [
                "e2f2fdf991dcc1a5"
            ]
        ]
    },
    {
        "id": "a8e5c88ab1ab8ef6",
        "type": "debug",
        "z": "9e0ebf9d.29a6c",
        "name": "",
        "active": true,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "payload",
        "targetType": "msg",
        "statusVal": "",
        "statusType": "auto",
        "x": 2470,
        "y": 4540,
        "wires": []
    },
    {
        "id": "910fd97075f98887",
        "type": "change",
        "z": "9e0ebf9d.29a6c",
        "name": "$$.payload.List.Item[Active[0] = \"1\"]",
        "rules": [
            {
                "t": "set",
                "p": "payload",
                "pt": "msg",
                "to": "$$.payload.List.Item[Active[0] = \"1\"]",
                "tot": "jsonata"
            }
        ],
        "action": "",
        "property": "",
        "from": "",
        "to": "",
        "reg": false,
        "x": 2210,
        "y": 4540,
        "wires": [
            [
                "a8e5c88ab1ab8ef6",
                "4ae45f9a0bc91f0f"
            ]
        ]
    },
    {
        "id": "a5ea3096d0529acc",
        "type": "change",
        "z": "9e0ebf9d.29a6c",
        "name": "$$.payload.List.Item[Active[0] = \"1\"].Hostname[0]",
        "rules": [
            {
                "t": "set",
                "p": "payload",
                "pt": "msg",
                "to": "$$.payload.List.Item[Active[0] = \"1\"].Hostname[0]",
                "tot": "jsonata"
            }
        ],
        "action": "",
        "property": "",
        "from": "",
        "to": "",
        "reg": false,
        "x": 2190,
        "y": 4660,
        "wires": [
            [
                "c171c7ca5b4813d0"
            ]
        ]
    },
    {
        "id": "c171c7ca5b4813d0",
        "type": "debug",
        "z": "9e0ebf9d.29a6c",
        "name": "",
        "active": false,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "payload",
        "targetType": "msg",
        "statusVal": "",
        "statusType": "auto",
        "x": 2510,
        "y": 4660,
        "wires": []
    },
    {
        "id": "e2f2fdf991dcc1a5",
        "type": "debug",
        "z": "9e0ebf9d.29a6c",
        "name": "",
        "active": false,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "payload",
        "targetType": "msg",
        "statusVal": "",
        "statusType": "auto",
        "x": 2590,
        "y": 4620,
        "wires": []
    },
    {
        "id": "61f053c7.62e594",
        "type": "fritzbox-config",
        "name": "FritzBox",
        "host": "fritz.box",
        "port": "49443",
        "ssl": true,
        "user": "USERNAME"
    }
]

```

 ![Bildschirmfoto 2022-09-24 um 21.52.46](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/a/9/a9339d4db8e2f7550a08c70c01a8024bac42f77e.png)

---

<div class="post-metadata">

**Author:** ![MrThiemann](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/mrthiemann/32/68063_2.png) [@MrThiemann](https://discourse.nodered.org/u/MrThiemann)\
**Post date:** [24 September 2022 19:58 UTC](https://discourse.nodered.org/t/split-array-and-objects/68173/10 "2022-09-24T19:58:35Z")

</div>

![Bildschirmfoto 2022-09-24 um 21.56.02](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/7/0/7017a43a80b457601c1ce229899a8c987160f8a3.png)

 ![Bildschirmfoto 2022-09-24 um 21.56.34](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/9/1/9164a767dca2166412ab948821b1b7fd03cc2076.png)

 ![Bildschirmfoto 2022-09-24 um 21.56.57](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/2/5/253e2b2b9daea9c6cc75a649a5c22bfb9a491452.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:** [24 September 2022 20:01 UTC](https://discourse.nodered.org/t/split-array-and-objects/68173/11 "2022-09-24T20:01:16Z")

</div>

> [@E1cid](#):
>
> Always best to supply input data, in a copyable form, and example test flow with input data in an inject node, as we do not have your data. a

I await data in a copyable form

---

<div class="post-metadata">

**Author:** ![MrThiemann](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/mrthiemann/32/68063_2.png) [@MrThiemann](https://discourse.nodered.org/u/MrThiemann)\
**Post date:** [24 September 2022 20:03 UTC](https://discourse.nodered.org/t/split-array-and-objects/68173/12 "2022-09-24T20:03:37Z")

</div>

what exactly do you need? isn't the flow not ok for you?

---

<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:** [24 September 2022 20:05 UTC](https://discourse.nodered.org/t/split-array-and-objects/68173/13 "2022-09-24T20:05:20Z")

</div>

Does the flow contain the incoming payload from the http request?  
Are the images showing data copyable?  
The debug offers a copy value button, hover to right of object name. Then edit the copied array to 3 array elements using a text editor.

---

<div class="post-metadata">

**Author:** ![MrThiemann](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/mrthiemann/32/68063_2.png) [@MrThiemann](https://discourse.nodered.org/u/MrThiemann)\
**Post date:** [24 September 2022 20:11 UTC](https://discourse.nodered.org/t/split-array-and-objects/68173/14 "2022-09-24T20:11:50Z")

</div>

aiaiai... no the pictures can of course be copied...  
but how am I supposed to send you the data that the https request outputs, because to be honest I don't...  
I could of course give you the debug from the http request. but that would be a miserably long string.

---

<div class="post-metadata">

**Author:** ![MrThiemann](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/mrthiemann/32/68063_2.png) [@MrThiemann](https://discourse.nodered.org/u/MrThiemann)\
**Post date:** [24 September 2022 20:15 UTC](https://discourse.nodered.org/t/split-array-and-objects/68173/15 "2022-09-24T20:15:14Z")

</div>

`> {"Index":["1"],"IPAddress":["192.168.178.168"],"MACAddress":["14:0A:C5:A0:F9:82"],"Active":["1"],"HostName":["192-168-178-168"],"InterfaceType":["802.11"],"X_AVM-DE_Port":["0"],"X_AVM-DE_Speed":["433"],"X_AVM-DE_UpdateAvailable":["0"],"X_AVM-DE_UpdateSuccessful":["unknown"],"X_AVM-DE_InfoURL":[""],"X_AVM-DE_Model":[""],"X_AVM-DE_URL":[""],"X_AVM-DE_Guest":["0"],"X_AVM-DE_VPN":["0"],"X_AVM-DE_WANAccess":["granted"],"X_AVM-DE_Disallow":["0"]}`  
this would be for just one... I can't show you all of them because that would be over 80,000 characters.  
alternatively maybe only from the active ones? (the debug from your first change node)

---

<div class="post-metadata">

**Author:** ![ghayne](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/ghayne/32/39_2.png) [@ghayne](https://discourse.nodered.org/u/ghayne)\
**Post date:** [24 September 2022 20:15 UTC](https://discourse.nodered.org/t/split-array-and-objects/68173/16 "2022-09-24T20:15:17Z")

</div>

> [@MrThiemann](#):
>
> I could of course give you the debug from the http request. but that would be a miserably long string.

Yes! Just that is what @E1cid was asking for.

---

<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:** [24 September 2022 20:29 UTC](https://discourse.nodered.org/t/split-array-and-objects/68173/18 "2022-09-24T20:29:48Z")

</div>

This is how you present an example flow, notice the data is in the inject node. No need to send us node we do not have installed and if we did would not retrieve your data. See how i edited the array to 5-6 objects.

The flow has several examples, The issue you had was you Typo's vars are case sensitive.

```auto
[{"id":"af13048d4c5fc875","type":"inject","z":"20bb0f7f9fab47a8","name":"","props":[{"p":"payload.List.Item","v":"[{\"Index\":[\"1\"],\"IPAddress\":[\"192.168.178.168\"],\"MACAddress\":[\"14:0A:C5:A0:F9:82\"],\"Active\":[\"1\"],\"HostName\":[\"192-168-178-168\"],\"InterfaceType\":[\"802.11\"],\"X_AVM-DE_Port\":[\"0\"],\"X_AVM-DE_Speed\":[\"433\"],\"X_AVM-DE_UpdateAvailable\":[\"0\"],\"X_AVM-DE_UpdateSuccessful\":[\"unknown\"],\"X_AVM-DE_InfoURL\":[\"\"],\"X_AVM-DE_Model\":[\"\"],\"X_AVM-DE_URL\":[\"\"],\"X_AVM-DE_Guest\":[\"0\"],\"X_AVM-DE_VPN\":[\"0\"],\"X_AVM-DE_WANAccess\":[\"granted\"],\"X_AVM-DE_Disallow\":[\"0\"]},{\"Index\":[\"2\"],\"IPAddress\":[\"192.168.178.48\"],\"MACAddress\":[\"F8:4F:AD:96:73:DD\"],\"Active\":[\"1\"],\"HostName\":[\"Android\"],\"InterfaceType\":[\"802.11\"],\"X_AVM-DE_Port\":[\"0\"],\"X_AVM-DE_Speed\":[\"144\"],\"X_AVM-DE_UpdateAvailable\":[\"0\"],\"X_AVM-DE_UpdateSuccessful\":[\"unknown\"],\"X_AVM-DE_InfoURL\":[\"\"],\"X_AVM-DE_Model\":[\"\"],\"X_AVM-DE_URL\":[\"\"],\"X_AVM-DE_Guest\":[\"0\"],\"X_AVM-DE_VPN\":[\"0\"],\"X_AVM-DE_WANAccess\":[\"granted\"],\"X_AVM-DE_Disallow\":[\"0\"]},{\"Index\":[\"6\"],\"IPAddress\":[\"192.168.178.34\"],\"MACAddress\":[\"A8:A7:95:47:13:1A\"],\"Active\":[\"1\"],\"HostName\":[\"BRWA8A79547131A\"],\"InterfaceType\":[\"802.11\"],\"X_AVM-DE_Port\":[\"0\"],\"X_AVM-DE_Speed\":[\"72\"],\"X_AVM-DE_UpdateAvailable\":[\"0\"],\"X_AVM-DE_UpdateSuccessful\":[\"unknown\"],\"X_AVM-DE_InfoURL\":[\"\"],\"X_AVM-DE_Model\":[\"\"],\"X_AVM-DE_URL\":[\"http://192.168.178.34\"],\"X_AVM-DE_Guest\":[\"0\"],\"X_AVM-DE_VPN\":[\"0\"],\"X_AVM-DE_WANAccess\":[\"granted\"],\"X_AVM-DE_Disallow\":[\"0\"]},{\"Index\":[\"7\"],\"IPAddress\":[\"192.168.178.56\"],\"MACAddress\":[\"FC:01:7C:AB:85:BC\"],\"Active\":[\"1\"],\"HostName\":[\"BRWFC017CAB85BC\"],\"InterfaceType\":[\"802.11\"],\"X_AVM-DE_Port\":[\"0\"],\"X_AVM-DE_Speed\":[\"43\"],\"X_AVM-DE_UpdateAvailable\":[\"0\"],\"X_AVM-DE_UpdateSuccessful\":[\"unknown\"],\"X_AVM-DE_InfoURL\":[\"\"],\"X_AVM-DE_Model\":[\"\"],\"X_AVM-DE_URL\":[\"http://192.168.178.56\"],\"X_AVM-DE_Guest\":[\"0\"],\"X_AVM-DE_VPN\":[\"0\"],\"X_AVM-DE_WANAccess\":[\"granted\"],\"X_AVM-DE_Disallow\":[\"0\"]},{\"Index\":[\"14\"],\"IPAddress\":[\"192.168.178.194\"],\"MACAddress\":[\"C4:DD:57:33:6D:D4\"],\"Active\":[\"1\"],\"HostName\":[\"ESP-336DD4\"],\"InterfaceType\":[\"802.11\"],\"X_AVM-DE_Port\":[\"0\"],\"X_AVM-DE_Speed\":[\"72\"],\"X_AVM-DE_UpdateAvailable\":[\"0\"],\"X_AVM-DE_UpdateSuccessful\":[\"unknown\"],\"X_AVM-DE_InfoURL\":[\"\"],\"X_AVM-DE_Model\":[\"\"],\"X_AVM-DE_URL\":[\"\"],\"X_AVM-DE_Guest\":[\"0\"],\"X_AVM-DE_VPN\":[\"0\"],\"X_AVM-DE_WANAccess\":[\"granted\"],\"X_AVM-DE_Disallow\":[\"0\"]}]","vt":"json"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","x":530,"y":1400,"wires":[["910fd97075f98887","a5ea3096d0529acc"]]},{"id":"910fd97075f98887","type":"change","z":"20bb0f7f9fab47a8","name":"$$.payload.List.Item[Active[0] = \"1\"]","rules":[{"t":"set","p":"payload","pt":"msg","to":"$$.payload.List.Item[Active[0] = \"1\"]","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":920,"y":1400,"wires":[["a8e5c88ab1ab8ef6","4ae45f9a0bc91f0f"]]},{"id":"a5ea3096d0529acc","type":"change","z":"20bb0f7f9fab47a8","name":"$$.payload.List.Item[Active[0] = \"1\"].Hostname[0]","rules":[{"t":"set","p":"payload","pt":"msg","to":"$$.payload.List.Item[Active[0] = \"1\"].HostName[0]","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":960,"y":1480,"wires":[["7bc99907.bb483","4dd16f57.771cc"]]},{"id":"a8e5c88ab1ab8ef6","type":"debug","z":"20bb0f7f9fab47a8","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":1250,"y":1300,"wires":[]},{"id":"4ae45f9a0bc91f0f","type":"split","z":"20bb0f7f9fab47a8","name":"","splt":"\\n","spltType":"str","arraySplt":1,"arraySpltType":"len","stream":true,"addname":"payload.hits","x":1210,"y":1400,"wires":[["17e291e5.cbab66"]]},{"id":"7bc99907.bb483","type":"split","z":"20bb0f7f9fab47a8","name":"","splt":"\\n","spltType":"str","arraySplt":1,"arraySpltType":"len","stream":true,"addname":"payload.hits","x":1270,"y":1480,"wires":[["c171c7ca5b4813d0"]]},{"id":"4dd16f57.771cc","type":"debug","z":"20bb0f7f9fab47a8","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":1190,"y":1540,"wires":[]},{"id":"17e291e5.cbab66","type":"change","z":"20bb0f7f9fab47a8","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload.HostName[0]","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":1400,"y":1400,"wires":[["e2f2fdf991dcc1a5"]]},{"id":"c171c7ca5b4813d0","type":"debug","z":"20bb0f7f9fab47a8","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":1450,"y":1480,"wires":[]},{"id":"e2f2fdf991dcc1a5","type":"debug","z":"20bb0f7f9fab47a8","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":1610,"y":1420,"wires":[]}]

```

---

<div class="post-metadata">

**Author:** ![MrThiemann](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/mrthiemann/32/68063_2.png) [@MrThiemann](https://discourse.nodered.org/u/MrThiemann)\
**Post date:** [24 September 2022 20:33 UTC](https://discourse.nodered.org/t/split-array-and-objects/68173/19 "2022-09-24T20:33:32Z")

</div>

thank you!  
and sorry for the inconvenience... I'm normally on the discord, it's a bit different there!  
If I have questions in the future, I'll try to present a reasonable result right away

---

<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:** [24 September 2022 20:35 UTC](https://discourse.nodered.org/t/split-array-and-objects/68173/20 "2022-09-24T20:35:53Z")

</div>

You will find if you present data that people can use , you will get more replies and a quicker answer/fix.  
We got there in the end and the world is still turning. Hope I have help with your issue and how to ask/present.

---

<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:** [8 October 2022 20:36 UTC](https://discourse.nodered.org/t/split-array-and-objects/68173/21 "2022-10-08T20:36:09Z")

</div>

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