I have a scenario where i have a string with set of secret names seperate by comma
$vardata = "SUBS_ID , EST_ID , KBD_ID" etc
now i want to loop through this data and retrive the corresponding secrets and process it in the same step of github actions.
AS, i want to process the data in the same step and the secret list can vary from 1 run to other , i cannot use a Step to first set the env variables and then retrive the secrets from there.
And i tried
$vardata | Foreach_object { $value= $_ ; echo ${{secrets[format('{0}', 'value')] }}
This doesnt work, i am getting errors
Is there any alterante solution, i have read about using jq , but i am not fully familiar with the concept or how to use it in powershell