Closed nekowinston closed 6 months ago
Closing all other issues since the complete theming mechanics have changed
@nekowinston thank you for updating this! If you're interested, feel free to open a PR on the Files website linking to this repo https://github.com/files-community/Website/.
Just leaving this here for the future, I wanted to try the following code to see if it would work on Powershell 5.1
https://stackoverflow.com/questions/75182380/how-to-convert-nested-json-into-hashtable-in-powershell
function Convert-PSCToHashTable
{
param(
$InputObject,
[int]$Depth = 5
)
if($Depth -gt 0){
if($InputObject -is [System.Collections.IList]){
return @($InputObject |ForEach-Object {Convert-PSCToHashTable $_ -Depth ($Depth - 1)})
}
if($InputObject.psobject.BaseObject -is [System.Management.Automation.PSCustomObject]){
$ht = @{}
foreach($prop in $InputObject.psobject.Properties){
$ht[$prop.Name] = Convert-PSCToHashTable $prop.Value -Depth ($Depth - 1)
}
return $ht
}
}
return $InputObject
}
$object = ConvertFrom-Json $json
$hashtable = Convert-PSCToHashTable $object
I'll probably try it out later when I'm on windows just out of curiosity
docs need to be updated, script should work already