Labeling Legend from influxDB

I am pulling data from InfluxDB I would like my legend to be labeled either from the “name” or “description” values in the database. How do I go about doing this?
{“name”:“name here”,“description”:“description here”,“unit”:"",“values”:[{“value”:-2.4,“timestamp”:“2020-11-23T14:32:46.699Z”}]}