# Split key from value

**URL:** <https://discourse.nodered.org/t/split-key-from-value/62066>\
**Category:** General\
**Tags:** http-request\
**Created:** [2 May 2022 14:03 UTC](https://discourse.nodered.org/t/split-key-from-value/62066 "2022-05-02T14:03:25Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![emnabk\_12](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/emnabk_12/32/59752_2.png) [@emnabk\_12](https://discourse.nodered.org/u/emnabk_12)\
**Post date:** [2 May 2022 14:03 UTC](https://discourse.nodered.org/t/split-key-from-value/62066/1 "2022-05-02T14:03:25Z")

</div>

Hi, when I receive a json object, I would like to only display the value "19" , howa can I do that?

```auto
[
    {
        "id": "ec79b803a1e72a08",
        "type": "http request",
        "z": "dc71eaad3af54282",
        "name": "",
        "method": "GET",
        "ret": "txt",
        "paytoqs": "ignore",
        "url": "https://firebasestorage.googleapis.com/v0/b/mmmm-bb726.appspot.com/o/volume.json?alt=media&token=b4950ba6-73d1-449f-a3d9-67050e95d79b",
        "tls": "",
        "persist": false,
        "proxy": "",
        "authType": "",
        "x": 590,
        "y": 240,
        "wires": [
            [
                "b0bc4e59fb7045ee"
            ]
        ]
    },
    {
        "id": "ee3f04ecd0c2c5b0",
        "type": "inject",
        "z": "dc71eaad3af54282",
        "name": "",
        "props": [
            {
                "p": "payload"
            },
            {
                "p": "topic",
                "vt": "str"
            }
        ],
        "repeat": "",
        "crontab": "",
        "once": false,
        "onceDelay": 0.1,
        "topic": "",
        "payloadType": "date",
        "x": 200,
        "y": 240,
        "wires": [
            [
                "ec79b803a1e72a08"
            ]
        ]
    },
    {
        "id": "b0bc4e59fb7045ee",
        "type": "json",
        "z": "dc71eaad3af54282",
        "name": "",
        "property": "payload",
        "action": "",
        "pretty": false,
        "x": 670,
        "y": 340,
        "wires": [
            [
                "a7b93011db205c8a"
            ]
        ]
    },
    {
        "id": "a7b93011db205c8a",
        "type": "debug",
        "z": "dc71eaad3af54282",
        "name": "",
        "active": true,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "false",
        "statusVal": "",
        "statusType": "auto",
        "x": 830,
        "y": 320,
        "wires": []
    }
]

```

---

<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:** [2 May 2022 14:22 UTC](https://discourse.nodered.org/t/split-key-from-value/62066/2 "2022-05-02T14:22:47Z")

</div>

You don't say where you wish to display it?  
You would use msg.payload.volume to display it,. eg in a gauge node like below

```auto
[{"id":"ee3f04ecd0c2c5b0","type":"inject","z":"bf9e1e33.030598","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payloadType":"date","x":170,"y":1300,"wires":[["ec79b803a1e72a08"]]},{"id":"ec79b803a1e72a08","type":"http request","z":"bf9e1e33.030598","name":"","method":"GET","ret":"obj","paytoqs":"ignore","url":"https://firebasestorage.googleapis.com/v0/b/mmmm-bb726.appspot.com/o/volume.json?alt=media&token=b4950ba6-73d1-449f-a3d9-67050e95d79b","tls":"","persist":false,"proxy":"","authType":"","x":260,"y":1340,"wires":[["a7b93011db205c8a","f5f7a25a.1cd978"]]},{"id":"a7b93011db205c8a","type":"debug","z":"bf9e1e33.030598","name":"","active":true,"tosidebar":true,"console":false,"tostatus":true,"complete":"payload","targetType":"msg","statusVal":"payload.volume","statusType":"msg","x":630,"y":1340,"wires":[]},{"id":"f5f7a25a.1cd978","type":"ui_gauge","z":"bf9e1e33.030598","name":"","group":"8b5cde76.edd58","order":4,"width":0,"height":0,"gtype":"gage","title":"gauge","label":"","format":"{{msg.payload.volume}}","min":0,"max":"40","colors":["#00b500","#e6e600","#ca3838"],"seg1":"","seg2":"","className":"","x":430,"y":1400,"wires":[]},{"id":"8b5cde76.edd58","type":"ui_group","name":"default","tab":"8f03e639.85956","order":1,"disp":false,"width":"12","collapse":false},{"id":"8f03e639.85956","type":"ui_tab","name":"Home","icon":"dashboard","order":2,"disabled":false,"hidden":false}]

```

p.s. you do not need the json node , the http request node can output a json object if you tell it to.

---

<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:** [16 May 2022 14:23 UTC](https://discourse.nodered.org/t/split-key-from-value/62066/3 "2022-05-16T14:23:29Z")

</div>

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