I try to parse a topic with a list of objects

Hello everyone,
I’m trying to split a JSON object with a list of objects using the json_v2 parser, but I’m having problems. I would like to have the tags and the fields and the timestamp separated. Unfortunately, the documentation doesn’t help me much. It is the same data format as the JSON output batch format.

Here is an example:
{"metrics":[{"fields":{"usage_idle":99.74489795894881,"usage_iowait":0,"usage_system":0.2551020407959661,"usage_user":0},"name":"cpu","tags":{"_in":"HostLoadsProd","cpu":"cpu-total","host":"test"},"timestamp":1704724909},{"fields":{"usage_idle":99.57173447496905,"usage_iowait":0,"usage_system":0.2141327623207242,"usage_user":0},"name":"cpu","tags":{"_in":"HostLoadsProd","cpu":"cpu-total","host":"test"},"timestamp":1704724910},{"fields":{"usage_idle":99.74999999976717,"usage_iowait":0,"usage_system":0.25000000000545697,"usage_user":0},"name":"cpu","tags":{"_in":"HostLoadsProd","cpu":"cpu-total","host":"test"},"timestamp":1704724911},{"fields":{"usage_idle":99.44237918380115,"usage_iowait":0,"usage_system":0.18587360595185173,"usage_user":0.3717472118952509},"name":"cpu","tags":{"_in":"HostLoadsProd","cpu":"cpu-total","host":"test"},"timestamp":1704724912},{"fields":{"usage_idle":100,"usage_iowait":0,"usage_system":0,"usage_user":0},"name":"cpu","tags":{"_in":"HostLoadsProd","cpu":"cpu-total","host":"test"},"timestamp":1704724913},{"fields":{"usage_idle":99.66329966298292,"usage_iowait":0,"usage_system":0.16835016834011543,"usage_user":0},"name":"cpu","tags":{"_in":"HostLoadsProd","cpu":"cpu-total","host":test"},"timestamp":1704724914},{"fields":{"usage_idle":99.3464052281614,"usage_iowait":0,"usage_system":0.3267973856220806,"usage_user":0},"name":"cpu","tags":{"_in":"HostLoadsProd","cpu":"cpu-total","host":"test"},"timestamp":1704724915},{"fields":{"usage_idle":99.70282317951438,"usage_iowait":0,"usage_system":0.1485884101076665,"usage_user":0.14858841010090948},"name":"cpu","tags":{"_in":"HostLoadsProd","cpu":"cpu-total","host":"test"},"timestamp":1704724916},{"fields":{"usage_idle":100,"usage_iowait":0,"usage_system":0,"usage_user":0},"name":"cpu","tags":{"_in":"HostLoadsProd","cpu":"cpu-total","host":"test"},"timestamp":1704724917},{"fields":{"usage_idle":99.53703703661286,"usage_iowait":0,"usage_system":0.46296296296608197,"usage_user":0},"name":"cpu","tags":{"_in":"HostLoadsProd","cpu":"cpu-total","host":test"},"timestamp":1704724918}]}

Take a look at Json_v2 how to have all elements in "tags" object added as tags? - #4 by srebhan

The original poster has a very similar structure, only yours is in an array. I would also suggest using the xpath parser over the JSON parser to handle more complex options.