How to check, if a hash is empty (no keys)

I don't think the Logstash configuration language really has hash literals in the same way it has array literals in which case this isn't possible except with a ruby filter.