How to compare Associative arrays in Powershell?

Question:

I have two associative arrays

I was wondering is there any good way do the comparison without writing my own function?

Answer:

There isn’t a way that I know of except writing a function to compare each key’s value (potentially recursive if the value is something other than a primitive object). However, associate arrays in PowerShell are just .NET types (System.Collections.Hashtable). You might want to open this question up to the broader .NET audience by adding the .NET tag to your question.

Source:

How to compare Associative arrays in Powershell? by licensed under CC BY-SA | With most appropriate answer!

Leave a Reply