Looping over the values of a Key Value field


It can be hard to understand what is in a key value field.  The below code will loop over the values and spit out the keys and the values.


${esc.hash}if (${esc.dollar}UtilMethods.isSet(${esc.dollar}content.metaData))
		<table class="metadata">
		  ${esc.hash}foreach(${esc.dollar}key in ${esc.dollar}content.metaData.entrySet())
			  ${esc.hash}if(${esc.dollar}key.key != "map")

Have you created code you'd like to share with the dotCMS community?

Share your code Become a Contributor