I’m trying to use the google translate api to translate words and save the content as a text or csv.
I’m having a hard time extracting the json content returned from invoke-Restmethod. It appears the translated data is in the “SyncRoot” property.
Any help would be appreciated
$Text = "Hi there!", "My name is John.", "What is your name?"," Cool!" $TargetLanguage = "es" $Uri = "https://translate.googleapis.com/translate_a/single?client=gtx&sl=auto&tl=$($TargetLanguage)&dt=t&q=$Text". $Response = Invoke-RestMethod -Uri $Uri -Method Get $Response.Content