jsoninfo: put printing a hna entry into a function and use it