From da5ed0c6329d0a8a43dcc3a3d1d990831fcaa536 Mon Sep 17 00:00:00 2001 From: Rui Chen <77432836+sharpchen@users.noreply.github.com> Date: Tue, 10 Dec 2024 00:33:23 +0800 Subject: [PATCH] main --- .../document/PowerShell/docs/Object Manipulation/Select.md | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/docs/document/PowerShell/docs/Object Manipulation/Select.md b/docs/document/PowerShell/docs/Object Manipulation/Select.md index 586598d8..c8f8fe78 100644 --- a/docs/document/PowerShell/docs/Object Manipulation/Select.md +++ b/docs/document/PowerShell/docs/Object Manipulation/Select.md @@ -75,8 +75,7 @@ README.md 0.85 ### Select Value Only To select single value of a property instead of being wrapped as an object, use `-ExpandProperty`. -The return type is still an `object[]` since there's no generic resolution on Powershell. -But each memeber should be string indeed in the following snippet. +The return type is still an `object[]`. But each memeber should be string indeed in the following snippet. ```ps1 gps | select -ExpandProperty Name @@ -85,7 +84,7 @@ gps | select -ExpandProperty Name ``` > [!NOTE] -> `Foreach-Object` can achieve the same thing +> `ForEach-Object` can achieve the same thing > ```ps1 > gps | foreach Name > # or use another alias of ForEach-Object % @@ -132,7 +131,7 @@ $partner['Status'] # Poisoned - `Expression`(`E`): the calculation logic for the new property represented as a script block. ```ps1 -$person = @{ +$person = [pscustomobject]@{ FirstName = 'John' LastName = 'Smith' }