Quantcast
Channel: Windows PowerShell forum
Viewing all articles
Browse latest Browse all 21975

Comparing two arrays

$
0
0

Hi Team,

I have two arrays as mentioned below

Array1      Array2

John         Mike

Mark        Paul

               Bill

               John

               Mark

I need to compare this two arrays and after comparison, Array2 should have only values which are present in Array1. All other values in Array2 should be deleted.

Say, after comparison, Array2 should have only John and Mark and other values should be deleted. Please suggest!!

Cheers

Jim


Viewing all articles
Browse latest Browse all 21975

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>