While porting over a code fragment from python I've stumbled over a trivial problem:
if isinstance(v['content'], dict):
What would be the most elegant way to port this over to groovy?
You can use instanceof (see map-specific example here), like this:
if (v['content'] instanceof java.util.map)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With