I'm struggling with filtering the sessionId from the following output:
status messages data
------ -------- ----
Success {@{code=success; message=Success}} @{sessionId=0662c4d429bb51ef772e875f9c9b3a46; faSessionId=qfvio0382283ihbknhfh70kvn4; phpSessionId=qfvio0382283ihbknhfh70kvn4}
I've tried with the following:
$sessionId = $response | select "data"
This is returning:
data
----
@{sessionId=f77d5bfb5bdc65163e605d9c7edbcaed; faSessionId=hrsbd5iuq8i6dttfhimpm5baf1; phpSessionId=hrsbd5iuq8i6dttfhimpm5baf1}
I can't get it working to only extract the sessionId part.
It would be great if anyone could assist with the correct PowerShell code to obtain this.
$sessionId = $response.data.sessionId