Expand my Community achievements bar.

Adobe Summit 2025: AEM Session Recordings Are Live! Missed a session or want to revisit your favorites? Watch the latest recordings now.

Mark Solution

This conversation has been locked due to inactivity. Please create a new post.

SOLVED

How can i iterate through the values from page.getProperties() in groovy?

Avatar

Level 6

How can i iterate through the values from page.getProperties() in groovy?

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Hi @Shaheena_Sheikh,

getProperties method returns ValueMap , you can iterate like this:

 

page?.getProperties()?.each { property ->
    println "Property key: ${property?.key}"
    println "Property value: ${property?.value}"
}

 

key represents property key, value represents property value.

View solution in original post

1 Reply

Avatar

Correct answer by
Community Advisor

Hi @Shaheena_Sheikh,

getProperties method returns ValueMap , you can iterate like this:

 

page?.getProperties()?.each { property ->
    println "Property key: ${property?.key}"
    println "Property value: ${property?.value}"
}

 

key represents property key, value represents property value.