passEverything is awesome!
Scanned: 10 days ago
MergeHashtable
Apteco PS Modules - PowerShell merge Hashtable
This module merges two hashtables into one. It is able to handle nested structures like hashtables, arrays and PSCustomObjects. Please see the examples below.
Just use
```PowerShell
$left = [hashtable]@{
"firstname" = "Florian"
"lastname" = "Friedrichs"
"address" = [hashtable]@{
"Street" = "Kaiserstraße 35"
}
"tags" = [Array]@("nice","company")
"product" = [PSCustomObject]@{
"name" = "Orbit"
"owner" = "Apteco Ltd."
}
}
$right = [hashtable]@{
"lastname" = "von Bracht"
"Street" = "Schaumainkai 87"
"address" = [hashtable]@{
"Street" = "Schaumainkai 87"
"Postcode" = 60596
}
"tags" = [Array]@("wow")
"product" = [PSCustomObject]@{
"sprint" = 106
}
}
Merge-Hashtable -Left $left -right $right -AddKeysFromRight -MergeArrays -MergePSCustomObjects -MergeHashtables
```
to merge two nested hashtables into one where the "right" will overwrite existing values from "left".
License: unknown
Published: about 1 month ago
SAFE Assessment
Compliance
Licenses
No license compliance issues
Secrets
No sensitive information found
Security
Vulnerabilities
No known vulnerabilities detected
Hardening
No application hardening issues
Threats
Tampering
No evidence of software tampering
Malware
No evidence of malware inclusion