Migrate Component properties node to new componnets
I have old component with different sling resource type I created a new component with new sling resource Type I want to Migrate old component node properties for ex title, description, file reference to new component properties how can I able to achieve that??
Node card = root.addNode("card","nt:unstructured");
root.getNode("card").setProperty("sling:resourceType","..../components/content/card");
Node ctaFooter = card.addNode("ctaFooter","nt:unstructured");
Now In this card component I want to bring all the properties that were using in
"sling:resourceType","../old/components/content/card"
Both sling resource type having different properties name I need a script that can perform this task