Use mqtt info in a automation

Hi I want to use a automation for triggering a relay, but I don’t now how to. The mqtt info is {“type”:“access”,“time”:1595752430,“isKnown”:“true”,“access”:“Admin”,“username”:“BadgeXander”,“uid”:“b7bac05f”}. I want to read the username. Can someone help me?
Good Luck