Hi Folks,

I have two distinct arrays which I want to pair up in a hash table. So the first array would represent all the keys in the hash table. The second array the matching values.

There are 24 items in each list and they are ordered.

I haven't been able to find any examples of this and I am wondering if it is possible?

$teams = Invoke-WebRequest -Uri 'http://www.uefa.com/uefaeuro/season=2016/teams/index.html'
$teamName = ($teams.ParsedHtml.getElementsByTagName('span') | Where{ $_.className -eq 'team-name_name'}).innerText

Sample of returned values . . .

Albania

Austria

Belgium

$teamURL = ($teams.ParsedHtml.getElementsByTagName('a') |
Where{ $_.className -eq 'team-hub_link'}).pathname -replace '//', 'http://www.uefa.com/uefaeuro/'
$teamID0 = $teamURL -replace '//uefaeuro/season=2016/teams/team=', ''
$teamID = ($teamID0 -replace '/index.html', '') -replace 'http://www.uefa.com/uefaeuro/uefaeuro/season=2016/teams/team='
$teamID

Sample of returned values . . .

2

8

13

Can these values create this table programmatically?

$table = @{
'Albania' = '2';
'Austria' = '8';
'Belgium' = '13';}

Thanks,

Michael