You won't really be able to rename the fields unless you transpose data, which is probably not the right approach in your use case. Here are a couple of other examples to give you ways to manipulate...
See more...
You won't really be able to rename the fields unless you transpose data, which is probably not the right approach in your use case. Here are a couple of other examples to give you ways to manipulate data This one gets the result object and sorts the dates to make sure they are in date order | eval dates=mvsort(json_array_to_mv(json_extract(_raw, "result")))
| eval result_today=replace(mvindex(dates, 0), "[^:]*:\s*(\d+)\}", "\1")
| eval result_tomorrow=replace(mvindex(dates, 1), "[^:]*:\s*(\d+)\}", "\1") This one extracts the fields and then uses the wildcarding technique with foreach to make the field assignments. | spath
| foreach result{}.* [ eval result_today=if("<<MATCHSTR>>"=strftime(_time, "%F"), '<<FIELD>>', result_today),
result_tomorrow=if("<<MATCHSTR>>"=strftime(_time, "%F"), result_tomorrow, '<<FIELD>>')]