Using dynamic inventory, access other hosts' variable where "other hosts" are list of hosts

Please see this closed issue on Ansible repo: https://github.com/ansible/ansible/issues/11583

Any suggestions would be most welcomed. Thanks!

Regards,
Boyang