From zabbix-api
login I have this output:
{"jsonrpc":"2.0","result":"4b79a399f043fa44c5653bee3ecb346d","id":0}
I'm trying to parse using the code above in ruby:
command_out = shell_out(command).stdout.to_s
node.default['zabbix_server']['zabbix_auth'] = command_out.lines.grep(/"(result)":"((\\\"|[^"])*)"/)
how can I grab only the "4b79a399f043fa44c5653bee3ecb346d"
?