Display [PSCUSTOMOBJECT] Inner Hashtables more cleanly? #318
-
I have a rather large collection of data that I'm storing in a List Object as a [PSCUSTOMOBJECT] with inner hashtables sorta like this $myListObject.Add([PSCUSTOMOBJECT]@{
Name = $($t.Name)
Status = $($t.Status)
Folder = @{
Status = $f.Config
Current = $t.Folder
Required = 'PATH SHOULD BE X'
}
CPUHotAdd = @{
Status = $C.Status
Current = $t.cpu
Required = 'Enabled'
} How would you go about displaying them cleanly inside of a New-HTMLDatatable? I tried -FlattenObject which works, however it makes it a little confusing to read since it basically expands the Current Tab like Folder and adds Folder.Status. Folder.Current, Folder.Required. Is there a better way to go about show data like this? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 4 replies
-
I've seen people doing nested tables somewhere in the issues/discussions but you would need to rewrite your object anyways. You could use TreeView functionality although I've not played a lot with it. You could use linked tables to display subtables in different tables and link the data. You could just rewrite the object the way flattenobject does but manually so you have more control over names of columns |
Beta Was this translation helpful? Give feedback.
I've seen people doing nested tables somewhere in the issues/discussions but you would need to rewrite your object anyways.
You could use TreeView functionality although I've not played a lot with it.
You could use linked tables to display subtables in different tables and link the data.
You could just rewrite the object the way flattenobject does but manually so you have more control over names of columns