function Get-JsonStringLeadsByDepth { <# .SYNOPSIS Returns the indented or leftdented spaces for the level, in that order .OUTPUTS [$spacesString, $shortSpacesString] [Indented string, Leftdented string] #> param ( $Depth = 0 ) $spacesString = [string]::new(" ", ($Depth + 1) * 2) $shortSpacesString = "" if ($Depth -gt 0) { $shortSpacesString = [string]::new(" ", $Depth * 2) } return ($spacesString, $shortSpacesString) }