How to convert Json MQTT values to correct type

Hi all I’m very new to Telegraf and I’m trying to convert the incoming values in this json string sent by my MQTT broker to the correct type.
“time”:“2022-10-20T22:59:36Z”,“apmac”:“E4:95:6E:44:3E:89”,“mymac”:“E0:E2:E6:96:65:E8”,“wrssi”:“-71”,“bmac”:“d36764319e6c”,“brssi”:-68

This is for a BLE becon tracking system.
I would also like to convert the time as this is the time on the sensor.

Further I was wondering I will need to operate many of my queries on based on mac addresses, is it better to store them as XX:XX:XX…or simply the string without the : ?

Any help would be greatly appreciated. I found some examples but I just can’t make heads and tails of them.

Thank you

Hi,

Have you looked at the [JSON_v2 parser? With it you can select what key/values will be tags or fields and choose which field can set the timestamp.

If you have, can you show us your config as to what you have tried to use to parse the JSON?

Thanks!