Iterate the property in efficient way
Hi Team, I have a requirement where my client wants one of my component to be appeared in customize way in page source(not the way it is rendering on page source as per the component rendering ) So I have to call a model class in footerlibs and iterate through the node of the component and making data available as he wished in page source. Node structure in jcr like below

as per above screen shot assume my component is name is "Acomponent". So I want to get the data on Acomponent where the first time my code got it.as per above ss it is "jcr:content/par/Acomponent"
Node parentNode = here Im getting the current page path and getting the node till pagepath+jcr:content
if(null!=ParentNode){
NodeIterator it = parentNode.getNodes("par*");
//instead of getting all the parentnodes including (par,custompar,par1) I want to get the node starting par (meant I want to get the par,par1 and par2 etc) and do the iteration further. But I tried NodeIterator it = parentNode.getNodes("par*"); and it is always getting Node named "par" only. here Im tryinng to skip of getting all the parent nodes like (custompar) for the efficiency of the code need to get the (par and par1). Any idea why it cant be done ?
}