How about:
$_.PersonGroups = @(Set-DataHash -InputObject $_)
You don’t need the “return”.
More Related Contents:
- Not all properties displayed
- Select the values of one property on all objects of an array in PowerShell
- Add new element to existing JSON array with jq
- Objects with no ‘.Count’ Property – use of @() (array subexpression operator) vs. [Array] cast
- Post an Array of Objects via JSON to ASP.Net MVC3
- Accessing a JSON object in Bash – associative array / list / another model
- Get-ChildItem.Length is Wrong
- Swift JSONDecode decoding arrays fails if single element decoding fails
- How to filter an array of objects based on values in an inner array with jq?
- Can an array be top-level JSON-text?
- How to check if element exists in array with jq
- How do I pass an array as a parameter to another script?
- Pipe complete array-objects instead of array items one at a time?
- A cmdlet which returns multiple objects, what collection type is it, if any? [PowerShell]
- How to output serialized JSON view data as an array of objects, instead of wrapped in an outer object?
- Data Rows to String to Array issue
- MongoDB rename database field within array
- Powershell: Piping output of pracl command to array
- Return Multidimensional Array From Function
- How can I decode a JSON response with an unknown key in Swift?
- PowerShell array initialization
- How do I call New-Object for a constructor which takes a single array parameter?
- Why is a leading comma required when creating an array?
- How to parse json in flutter?
- How to deserialize dodgy JSON (with improperly quoted strings, and missing brackets)?
- YAML equivalent of array of objects in JSON
- PowerShell doesn’t return an empty array as an array
- jq: recursively merge objects and concatenate arrays
- Getting “System.Collections.Generic.List`1[System.String]” in CSV File export when data is okay on screen
- How do I create array of arrays in PowerShell?