[Solved] Powershell script to retrieve JSON content that has square bracket in the beginning and the end

kjyon2 Asks: Powershell script to retrieve JSON content that has square bracket in the beginning and the end
I have a Json file, input.json, with a content of

[ { “id”: “1234abc”, “createdDate”:”2021-10-04 } ]

However, when I use the Powershell script below to retrieve its content, I get nothing in return.

Code:
$inputread=Get-Content -raw "D:sourcefolderinput.json" | ConvertFrom-Json
Write-Output "Input is $inputread

I got only

Code:
Input is

Please advise me how to get the content of the Json file.

Ten-tools.com may not be responsible for the answers or solutions given to any question asked by the users. All Answers or responses are user generated answers and we do not have proof of its validity or correctness. Please vote for the answer that helped you in order to help others find out which is the most helpful answer. Questions labeled as solved may be solved or may not be solved depending on the type of question and the date posted for some posts may be scheduled to be deleted periodically. Do not hesitate to share your response here to help other visitors like you. Thank you, Ten-tools.