i want to render below JSON to the image shown
let finalSplit = [
{
start: "73",
end: "76",
splits: [
{
word: "Now",
start: "73",
color:"#FF6262",
name:"extra",
end: "76",
},
],
},
{
start: "27",
end: "72",
splits: [
{
word: "GitHub Actions",
start: "31",
name:"sub1",
color:"#DFF652",
end: "45",
},
{
word: "the GitHub Actions “New Workflow” experience.",
start: "27",
name:"main",
color:"#62FF8E",
end: "72",
},
{
word: "GitHub",
start: "31",
name:"sub2",
color:"#9483FF",
end: "37",
},
],
},
];
i tried to loop each array and render but since it format it have duplicate not able to render aggregated version
const Mark = () => {
return (
<>
{
finalSplit.map((i)=>{
return (
<div>
i.split.map((j)=>{
<div>{j.text}</div>
})
</div>
)
})
}
<>
);
}
need to some how generate other structure
text : “announcing improvements to the GitHub Actions “New Workflow” experience. Now, when you want to create”
and each place we get offsets also