Split key from value

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

[
    {
        "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": []
    }
]

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

[{"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.

1 Like

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