Я хочу получить type
результаты из этого файла JSON. Как я могу это сделать?
{
"inputs": [{
"title": "vault_beats",
"global": true,
"name": "Beats",
"content_pack": null,
"created_at": "2019-01-11T05:31:49.720Z",
"type": "org.graylog.plugins.beats.Beats2Input",
"creator_user_id": "admin",
"attributes": {
"recv_buffer_size": 1048576,
"tcp_keepalive": false,
"number_worker_threads": 1,
"tls_client_auth_cert_file": "",
"beats_prefix": false,
"bind_address": "0.0.0.0",
"tls_cert_file": "",
"port": 5044,
"tls_key_file": "admin",
"tls_enable": false,
"tls_key_password": "admin",
"tls_client_auth": "disabled",
"override_source": null
},
"static_fields": {},
"node": null,
"id": "5c382a45590801001d742017"
}, {
"title": "vault_beatsl",
"global": true,
"name": "GELF TCP",
"content_pack": null,
"created_at": "2019-01-11T05:32:05.869Z",
"type": "org.graylog2.inputs.gelf.tcp.GELFTCPInput",
"creator_user_id": "admin",
"attributes": {
"recv_buffer_size": 1048576,
"tcp_keepalive": false,
"use_null_delimiter": true,
"number_worker_threads": 1,
"tls_client_auth_cert_file": "",
"bind_address": "0.0.0.0",
"tls_cert_file": "",
"decompress_size_limit": 8388608,
"port": 12201,
"tls_key_file": "admin",
"tls_enable": false,
"tls_key_password": "admin",
"max_message_size": 2097152,
"tls_client_auth": "disabled",
"override_source": null
},
"static_fields": {},
"node": null,
"id": "5c382a55590801001d74202b"
}],
"total": 2
}
Пример вывода: -
"type":"org.graylog.plugins.beats.Beats2Input"
"type":"org.graylog2.inputs.gelf.tcp.GELFTCPInput"