Skip to content

Commit da5ed0c

Browse files
authored
main
1 parent 180e5c7 commit da5ed0c

File tree

1 file changed

+3
-4
lines changed
  • docs/document/PowerShell/docs/Object Manipulation

1 file changed

+3
-4
lines changed

docs/document/PowerShell/docs/Object Manipulation/Select.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -75,8 +75,7 @@ README.md 0.85
7575
### Select Value Only
7676

7777
To select single value of a property instead of being wrapped as an object, use `-ExpandProperty`.
78-
The return type is still an `object[]` since there's no generic resolution on Powershell.
79-
But each memeber should be string indeed in the following snippet.
78+
The return type is still an `object[]`. But each memeber should be string indeed in the following snippet.
8079

8180
```ps1
8281
gps | select -ExpandProperty Name
@@ -85,7 +84,7 @@ gps | select -ExpandProperty Name
8584
```
8685

8786
> [!NOTE]
88-
> `Foreach-Object` can achieve the same thing
87+
> `ForEach-Object` can achieve the same thing
8988
> ```ps1
9089
> gps | foreach Name
9190
> # or use another alias of ForEach-Object %
@@ -132,7 +131,7 @@ $partner['Status'] # Poisoned
132131
- `Expression`(`E`): the calculation logic for the new property represented as a script block.
133132

134133
```ps1
135-
$person = @{
134+
$person = [pscustomobject]@{
136135
FirstName = 'John'
137136
LastName = 'Smith'
138137
}

0 commit comments

Comments
 (0)