Why is PowerShell applying the predicate of a `Where` to an empty list
问题 If I run this in PowerShell, I expect to see the output 0 (zero): Set-StrictMode -Version Latest $x = "[]" | ConvertFrom-Json | Where { $_.name -eq "Baz" } Write-Host $x.Count Instead, I get this error: The property 'name' cannot be found on this object. Verify that the property exists and can be set. At line:1 char:44 + $x = "[]" | ConvertFrom-Json | Where { $_.name -eq "Baz" } + ~~~~~~~~~~~~~~~ + CategoryInfo : InvalidOperation: (:) [], RuntimeException + FullyQualifiedErrorId :