Posts

Showing posts from November, 2019

AEM Query Builder getting property values as json

Image
I got a requirement to list the pages which is having a property and also get the property value. Using query builder we can easily get the nodes having a specific property and there are lot of documentation, blogs which provides that but for retrieving the property value, I was in assumption that we need to write java logic where we can iterate through the nodes and then read property value. I searched a lot to find whether it can be do-abled using query builder, so that I can avoid writing java logic and finally with lot of research and trial and error I was able to read the property value using query builder. There might be documentation related to this and I was not able to find it and thought of documenting it. Ex: Run the below query using https://<host>:<port>/libs/cq/search/content/querydebug.html path:/content/we-retail/language-masters 1_property=jcr:title 1_property.operation : exists p.hits=selective p.nodedepth p.properties=jcr:path jcr:title p...