AFFISH 0 Newbie Poster

I have called Rest API using powershell function but i need to get date entry from all objects like english-and-wales, scotland , northern ireland. using this $list.'england-and-wales'.events.date i will get only england-and-wales details but remaining scotland, northern ireland date i am unable to fetch

function Get-Holiday
Invoke-RestMethod -Method Get -Uri https://www.gov.uk/bank-holidays.json

$list = Get-Holiday

list | ConvertTo-Json -Depth 3
$list.'england-and-wales'.events[0]
I need to get date entry from all england-and-wales, scotland, northern ireland. can you please provide solution for that

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.