augeas onlyif match for service name

I am testing below manifests in different environments but I want to sort it out by service name "onlyif => "match service-name[servicename'] size == 0"rather than using "onlyif => "match service-name[port = '$port'] size == 0"