# How to select specific item from data

**URL:** <https://discourse.nodered.org/t/how-to-select-specific-item-from-data/65408>\
**Category:** General\
**Created:** [21 July 2022 08:57 UTC](https://discourse.nodered.org/t/how-to-select-specific-item-from-data/65408 "2022-07-21T08:57:51Z")\
**Posts on this page:** 7\
**Page:** 2

<div class="post-metadata">

**Author:** ![Trying\_to\_learn](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/trying_to_learn/32/28400_2.png) [@Trying\_to\_learn](https://discourse.nodered.org/u/Trying_to_learn)\
**Post date:** [21 July 2022 10:08 UTC](https://discourse.nodered.org/t/how-to-select-specific-item-from-data/65408/21 "2022-07-21T10:08:31Z")

</div>

# IF

The number is always `11714368` simply edit the first `switch` node to `==` rather than `>`  
and get rid of the second `switch` node.

---

<div class="post-metadata">

**Author:** ![tsuratolya](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/tsuratolya/32/59853_2.png) [@tsuratolya](https://discourse.nodered.org/u/tsuratolya)\
**Post date:** [21 July 2022 10:17 UTC](https://discourse.nodered.org/t/how-to-select-specific-item-from-data/65408/22 "2022-07-21T10:17:02Z")

</div>

Oh yes, that's what you need. Your code helped me. He filtered what I needed. Thanks for the help. You are doing great.

---

<div class="post-metadata">

**Author:** ![tsuratolya](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/tsuratolya/32/59853_2.png) [@tsuratolya](https://discourse.nodered.org/u/tsuratolya)\
**Post date:** [21 July 2022 10:17 UTC](https://discourse.nodered.org/t/how-to-select-specific-item-from-data/65408/23 "2022-07-21T10:17:53Z")

</div>

Respect to you

---

<div class="post-metadata">

**Author:** ![Trying\_to\_learn](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/trying_to_learn/32/28400_2.png) [@Trying\_to\_learn](https://discourse.nodered.org/u/Trying_to_learn)\
**Post date:** [21 July 2022 10:18 UTC](https://discourse.nodered.org/t/how-to-select-specific-item-from-data/65408/24 "2022-07-21T10:18:13Z")

</div>

Mark which ever one you want to declare as the one that solved it as the solution.  
That way if anyone else has a similar problem they can see the solution quickly.

---

<div class="post-metadata">

**Author:** ![Trying\_to\_learn](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/trying_to_learn/32/28400_2.png) [@Trying\_to\_learn](https://discourse.nodered.org/u/Trying_to_learn)\
**Post date:** [21 July 2022 10:18 UTC](https://discourse.nodered.org/t/how-to-select-specific-item-from-data/65408/25 "2022-07-21T10:18:46Z")

</div>

Thank, but I try to do the right thing and help as many people as I can.

---

<div class="post-metadata">

**Author:** ![tsuratolya](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/tsuratolya/32/59853_2.png) [@tsuratolya](https://discourse.nodered.org/u/tsuratolya)\
**Post date:** [21 July 2022 10:20 UTC](https://discourse.nodered.org/t/how-to-select-specific-item-from-data/65408/26 "2022-07-21T10:20:33Z")

</div>

```auto
[
    {
        "id": "3da047291d2d65d0",
        "type": "inject",
        "z": "9ee2cc1b247fc8f4",
        "name": "",
        "props": [
            {
                "p": "payload"
            },
            {
                "p": "topic",
                "vt": "str"
            }
        ],
        "repeat": "",
        "crontab": "",
        "once": false,
        "onceDelay": 0.1,
        "topic": "",
        "payload": "11714368",
        "payloadType": "num",
        "x": 260,
        "y": 560,
        "wires": [
            [
                "602b1d912c7a4958"
            ]
        ]
    },
    {
        "id": "602b1d912c7a4958",
        "type": "switch",
        "z": "9ee2cc1b247fc8f4",
        "name": "",
        "property": "payload",
        "propertyType": "msg",
        "rules": [
            {
                "t": "gt",
                "v": "11000000",
                "vt": "num"
            },
            {
                "t": "else"
            }
        ],
        "checkall": "true",
        "repair": false,
        "outputs": 2,
        "x": 490,
        "y": 600,
        "wires": [
            [
                "6be735273cfab3ff"
            ],
            [
                "5dd965fe633160aa"
            ]
        ]
    },
    {
        "id": "6be735273cfab3ff",
        "type": "switch",
        "z": "9ee2cc1b247fc8f4",
        "name": "",
        "property": "payload",
        "propertyType": "msg",
        "rules": [
            {
                "t": "lt",
                "v": "12000000",
                "vt": "num"
            },
            {
                "t": "else"
            }
        ],
        "checkall": "true",
        "repair": false,
        "outputs": 2,
        "x": 670,
        "y": 560,
        "wires": [
            [
                "0110c7af1cacd1f2"
            ],
            [
                "5dd965fe633160aa"
            ]
        ]
    },
    {
        "id": "5dd965fe633160aa",
        "type": "debug",
        "z": "9ee2cc1b247fc8f4",
        "name": "Rejected",
        "active": true,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "payload",
        "targetType": "msg",
        "statusVal": "",
        "statusType": "auto",
        "x": 840,
        "y": 620,
        "wires": []
    },
    {
        "id": "0110c7af1cacd1f2",
        "type": "debug",
        "z": "9ee2cc1b247fc8f4",
        "name": "WANTED",
        "active": true,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "payload",
        "targetType": "msg",
        "statusVal": "",
        "statusType": "auto",
        "x": 860,
        "y": 520,
        "wires": []
    },
    {
        "id": "4662e7af7611501f",
        "type": "inject",
        "z": "9ee2cc1b247fc8f4",
        "name": "",
        "props": [
            {
                "p": "payload"
            },
            {
                "p": "topic",
                "vt": "str"
            }
        ],
        "repeat": "",
        "crontab": "",
        "once": false,
        "onceDelay": 0.1,
        "topic": "",
        "payload": "1171436899",
        "payloadType": "num",
        "x": 270,
        "y": 620,
        "wires": [
            [
                "602b1d912c7a4958"
            ]
        ]
    }
]

```

Once again I will explain helped me. I needed to filter values with 8 digits and they start with 11......

 ![8](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/0/a/0a0eef2aff7f00bcb5c5cfa543affc4b1e967f8b.png)

---

<div class="post-metadata">

**Author:** ![zenofmud](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/zenofmud/32/316_2.png) [@zenofmud](https://discourse.nodered.org/u/zenofmud)\
**Post date:** [21 July 2022 15:48 UTC](https://discourse.nodered.org/t/how-to-select-specific-item-from-data/65408/27 "2022-07-21T15:48:03Z")

</div>

Try this

```auto
[{"id":"3da047291d2d65d0","type":"inject","z":"4e2e9032f47e36b4","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"11714368","payloadType":"num","x":240,"y":180,"wires":[["602b1d912c7a4958"]]},{"id":"602b1d912c7a4958","type":"switch","z":"4e2e9032f47e36b4","name":"","property":"payload","propertyType":"msg","rules":[{"t":"gte","v":"11000000","vt":"str"},{"t":"else"}],"checkall":"true","repair":false,"outputs":2,"x":490,"y":200,"wires":[["6be735273cfab3ff"],["5dd965fe633160aa"]]},{"id":"6be735273cfab3ff","type":"switch","z":"4e2e9032f47e36b4","name":"","property":"payload","propertyType":"msg","rules":[{"t":"lt","v":"12000000","vt":"num"},{"t":"else"}],"checkall":"true","repair":false,"outputs":2,"x":790,"y":160,"wires":[["5b9366146577538a"],["5dd965fe633160aa"]]},{"id":"5dd965fe633160aa","type":"debug","z":"4e2e9032f47e36b4","name":"Rejected","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":820,"y":240,"wires":[]},{"id":"4662e7af7611501f","type":"inject","z":"4e2e9032f47e36b4","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"1171436899","payloadType":"num","x":250,"y":240,"wires":[["602b1d912c7a4958"]]},{"id":"5b9366146577538a","type":"debug","z":"4e2e9032f47e36b4","name":"WANTED","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":960,"y":120,"wires":[]},{"id":"5207285eacaf7ae4","type":"inject","z":"4e2e9032f47e36b4","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"10000000","payloadType":"num","x":240,"y":120,"wires":[["602b1d912c7a4958"]]}]

```

[Previous page](https://discourse.nodered.org/t/how-to-select-specific-item-from-data/65408.md?page=1)
