Is there a way to embed a Table within a cell of a 'parent' table

0 votes
asked Apr 7, 2025 in Question / help by anonymous
Column 1Column 2Column 3Properties
datadatadata
NameValue
datadatadata
NameValue
datadatadata
NameValue
datadatadata
NameValue

Is it possible to get PlantUML to render the table within table layout shown above -

If so please provide an example

Many thanks

1 Answer

0 votes
answered Apr 8, 2025 by dickmaley (4,160 points)

@startuml
!Diagram = "json"
json JSON {
    "Table": [
        {
            "Column1": "data",
            "Column2": "data",
            "Column3": "data",
            "Nested Table": [
                {
                    "name": "kkkk",
                    "value": "qqq"
                },
                {
                    "name": "kkkk",
                    "value": "qqq"
                },
                {
                    "name": "kkkk",
                    "value": "qqq"
                }
            ]
        },
        {
            "Column1": "data",
            "Column2": "data",
            "Column3": "data",
            "Nested Table": [
                {
                    "name": "kkkk",
                    "value": "qqq"
                },
                {
                    "name": "kkkk",
                    "value": "qqq"
                },
                {
                    "name": "kkkk",
                    "value": "qqq"
                }
            ]
        },
        {
            "Column1": "data",
            "Column2": "data",
            "Column3": "data",
            "Nested Table": [
                {
                    "name": "kkkk",
                    "value": "qqq"
                },
                {
                    "name": "kkkk",
                    "value": "qqq"
                },
                {
                    "name": "kkkk",
                    "value": "qqq"
                }
            ]
        }
    ]
}
@enduml

image

This could be done better, this is a first cut.

commented Apr 8, 2025 by anonymous
Thanks, that's closer than I've been able to configure - but it doesn't really produce a traditional Table Row/Column orientated layout. The above is more like a Tree structure with borders
...