Types/OpenPackage/get_Template.json.ps1

<#
.SYNOPSIS
    Gets a package's `template.json`
.DESCRIPTION
    Gets the content of any `template.json` files in the package
#>

[OutputType([PSObject])]
param()

foreach ($part in $this.GetParts()) {
    if ($part.Uri -notmatch '/template\.json$') { continue }
        
    if ($part.Reader) {
        $part.Read()
    } else {
        $part
    }
}