Skip to content

Instantly share code, notes, and snippets.

@chriskuech
Created May 5, 2019 04:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save chriskuech/f5cb0f31e0bcd4f55124e20b7fbe46f3 to your computer and use it in GitHub Desktop.
Save chriskuech/f5cb0f31e0bcd4f55124e20b7fbe46f3 to your computer and use it in GitHub Desktop.
$nodePropertyNames = "Tier1", "Tier2", "Tier2", "LeafName"
$container = "./container"
$treePath = ($nodePropertyNames | % {$obj.$_}) -join "/"
$fsPath = "$container/$treePath.json"
# Store
New-Item $fsPath -Force
$obj | ConvertTo-Json | Out-File $fsPath
# Retrieve
$obj = Get-Item $fsPath | ConvertFrom-Json
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment