I use safe navigation operator to avoid NPEs like this
myInstance?.field1
myInstance?.field2
myInstance?.field3
To convert the code above in for loop i wrote
<g:each var="i" in="${ (1..<4 }">
myInstance['field'+i]
</g:each>
How do I use the safe navigation operator on above code when I am retrieving values in hashmap format?
I looked into docs here but it does not have a similar example.