Skip to content

Commit

Permalink
🐛 Fix wildcard handling
Browse files Browse the repository at this point in the history
  • Loading branch information
brianary authored Feb 22, 2024
1 parent 252f22d commit 7ddd47e
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
5 changes: 3 additions & 2 deletions Export-Json.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,9 @@ filter Import-Reference
if($Path)
{
return Resolve-Path -Path $Path |
Get-Content -Raw |
Export-Json.ps1 -JsonPointer $JsonPointer -Compress:$Compress
ForEach-Object {$_ |Get-Content -Raw |
Export-Json.ps1 -JsonPointer $JsonPointer -Compress:$Compress}

}
$root = $InputObject -is [string] ? ($InputObject |ConvertFrom-Json) : $InputObject
$selection = $root |Select-Json.ps1 $JsonPointer
Expand Down
6 changes: 3 additions & 3 deletions Resolve-JsonPointer.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -121,9 +121,9 @@ Process
{
if($Path)
{
return Get-Content -Path $Path -Raw |
ConvertFrom-Json -AsHashtable |
Resolve-Next -Segments $jsonpath
return Resolve-Path -Path $Path |
Get-Content -Raw |
ForEach-Object {$_ |ConvertFrom-Json -AsHashtable |Resolve-Next -Segments $jsonpath}
}
if($null -eq $InputObject) {return}
if($InputObject -is [string])
Expand Down
4 changes: 2 additions & 2 deletions Select-Json.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -165,8 +165,8 @@ Process
{
return Resolve-Path -Path $Path |
Get-Content -Raw |
ConvertFrom-Json -AsHashtable |
Select-Json.ps1 -JsonPointer $JsonPointer -FollowReferences:$FollowReferences
ForEach-Object {$_ |ConvertFrom-Json -AsHashtable |
Select-Json.ps1 -JsonPointer $JsonPointer -FollowReferences:$FollowReferences}
}
if($null -eq $InputObject) {return}
if($InputObject -is [string])
Expand Down

0 comments on commit 7ddd47e

Please sign in to comment.