Parse target from data list items in time series panel


#1

A panel receives time series data (from InfluxDB) as a list of these objects:

{
  datapoints: [],
  target: "test.my_field {tag_group_1: tag_value_1, tag_group_2: tag_value_2}"
}

Is there a utility in Grafana that parses the target bit into an object? Maybe something like:

{
  fields: ["my_field"],
  groups: {
    tag_group_1: "tag_value_1",
    tag_group_2: "tag_value_2"
  }
}

Thanks!