I have a JSON object of currency conversion rates as the event, which looks like
{
"base": "USD",
"rates": {
"GBP": 1.6,
"ZAR": 10.2
}
}
I want to pull the rates out as a table to look like
Currency Rate
======== ====
GBP 1.6
ZAR 10.2
I can't figure out how to pull out the attribute as a column
How's this look?
sourcetype=your_json | head 1
| spath output=gbp path=rates{}.GBP
| spath output=zar path=rates{}.ZAR
| table gbp, zar