Hey fellas,
I have a multifield which has some custom data.
I want to expose the data to vuejs in a custom data model object.
What is the best approach for the same?
1. Create a custom JsonObject with the fields we want.
2. Use Sling Model Exporter
The problem with #2 is I can get the json response for parent model but the child multifield is coming as items - item0.model.json, item1.model.json
How do I combine it in JsonArray format?
Here's a sample -
parentComp: {
title: "Parent Title",
subtitle: "Parent Subtitle",
childComp : [
{
title: "Child 1 Title",
description: "Some Subtext can go here for more details",
imageSrc: "/src/assets/Icons/Document.svg",
label: "Learn More",
link: "https://google.com",
},
{
title: "Child 2 Title",
description: "Some Subtext can go here for more details",
imageSrc: "/src/assets/Icons/Email.svg",
label: "Learn More",
link: "https://google.com",
},
.
.
......
]