Skip to main content

Oi,



Preciso extrair somente o valor da chave lastvalue do retorno abaixo. Como proceder ?



> {

> "jsonrpc": "2.0",

> "result": [

> {

> "itemid": "123409",

> "type": "0",

> "snmp_community": "",

> "snmp_oid": "",

> "hostid": "10619",

> "name": "name",

> "key_": "getQueueDataGraph.act[renew-partner]",

> "delay": "5m",

> "history": "90d",

> "trends": "365d",

> "status": "0",

> "value_type": "3",

> "trapper_hosts": "",

> "units": "",

> "snmpv3_securityname": "",

> "snmpv3_securitylevel": "0",

> "snmpv3_authpassphrase": "",

> "snmpv3_privpassphrase": "",

> "formula": "",

> "error": "",

> "lastlogsize": "0",

> "logtimefmt": "",

> "templateid": "0",

> "valuemapid": "0",

> "params": "",

> "ipmi_sensor": "",

> "authtype": "0",

> "username": "",

> "password": "",

> "publickey": "",

> "privatekey": "",

> "mtime": "0",

> "flags": "0",

> "interfaceid": "479",

> "port": "",

> "description": "",

> "inventory_link": "0",

> "lifetime": "30d",

> "snmpv3_authprotocol": "0",

> "snmpv3_privprotocol": "0",

> "state": "0",

> "snmpv3_contextname": "",

> "evaltype": "0",

> "jmx_endpoint": "",

> "master_itemid": "0",

> "lastclock": "1562006810",

> "lastns": "933770046",

> "lastvalue": "2300307",

> "prevvalue": "2285155"

> }

> ],

> "id": 1

> }

Acho que você consegue sua resposta aqui: 😉


Olá @Saulo_Zimbaro,



conseguiu sanar sua dúvida?


Comente