I receive this string in json format from my frontend:
{"hosts":[{"name":"localhost"},{"name":"localhost"},{"name":"localhost"}]}
What I want to do is to iterate each one of the hosts and print their name.
How do I map my string to do that using java?