I have an array, with a nested hashtable containing data:
tid : 1
token : 12345
participant_info : @{firstname=bob; lastname=smith; [email protected]}
completed : y
tid : 2
token : 67890
participant_info : @{firstname=Alice; lastname=Jones; [email protected]}
completed : n
I would like to output this as a CSV with the nested items of firstname, surname and email pulled out of the inner hashtable - eg
tid,token,firstname,surname,email,completed
1,12345,bob,smith,[email protected],y
2,67890,alice,jones,[email protected],n
I'm going to guess that the answer is looping through with foreach and creating a custom ps object, but because my nested items aren't named, I can't work out how to do this using the other examples on here.
Any assistance is appreciated! Thanks!
@(but no corresponding closing).