I have a powershell script that grabs the Bing daily image, and saves it on my pc as "bing.bmp":
irm "bing.com$((irm "bing.com/HPImageArchive.aspx?format=js&mkt=en-IN&n=1").images[1].url)" -OutFile bing.bmp
And that works fine. I would also like to pull the image description from the same file it is pulling the url from. The value is called "copyright", and I can't seem to get it. I tried this:
irm "bing.com$((irm "bing.com/HPImageArchive.aspx?format=js&mkt=en-IN&n=1").images[1].copyright)" -OutFile bing.txt
but it didn't work. Is there any way I can get the value "copyright" from the JSON file, and output it as a .txt file?
EDIT: This is the JSON I am trying to pull the value from:
https://bing.com/HPImageArchive.aspx?format=js&mkt=en-IN&n=1