SOLVED

How I can separately data in 1 column from a csv file to others columns with header ?

%3CLINGO-SUB%20id%3D%22lingo-sub-1998705%22%20slang%3D%22en-US%22%3EHow%20I%20can%20separately%20data%20in%201%20column%20from%20a%20csv%20file%20to%20others%20columns%20with%20header%20%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1998705%22%20slang%3D%22en-US%22%3E%3CP%20class%3D%22x-hidden-focus%22%3E%3CSTRONG%3EDear%20supporter%2C%3C%2FSTRONG%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThank%20you%20for%20your%20visit%2C%20I'm%20a%20very%20new%20with%20Powershell%20data%20array%2C%20I%20have%20a%20question%20and%20I%20hope%20you%20can%20help%20me%3A%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20have%20a%20.csv%20file%20with%203%20column%2C%20%22Auditdata%22%20is%20one%20of%20them%20and%20it%20contains%20too%20much%20data%20and%20I%20can't%20filter%20them.%20its%20data%20in%20format%20%22Header%22%3A%22data%22%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ECan%20you%20help%20me%20a%20solution%20to%20spit%20those%20data%26nbsp%3Bto%20others%20column%20with%20header%20please%20%3F%20also%20if%20we%20not%20spit%20the%20data%2C%20is%20there%20any%20way%20we%20can%20select%20one%20of%20them%2C%20like%20example%20I%20just%20want%20to%20get%20%22%3CSPAN%3EResourceTitle%22%3C%2FSPAN%3E%26nbsp%3Bdata%20only%20in%20column%20%22Auditdata%22%20%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSTRONG%3EHere%20is%20data%20sample%3A%3C%2FSTRONG%3E%3C%2FP%3E%3CTABLE%3E%3CTBODY%3E%3CTR%3E%3CTD%3E%3CP%20class%3D%22contentCodeblock%22%3EAuditData%3C%2FP%3E%3C%2FTD%3E%3C%2FTR%3E%3CTR%3E%3CTD%3E%3CP%20class%3D%22contentCodeblock%20x-hidden-focus%22%3E%7B%22ResourceUrl%22%3A%22%3CA%20href%3D%22https%3A%2F%2Fwww.abc.com%26quot%3B%2C%26quot%3BResourceTitle%26quot%3B%3A%26quot%3BHow%22%20target%3D%22_blank%22%20rel%3D%22noopener%20nofollow%20noreferrer%22%3Ehttps%3A%2F%2Fwww.abc.com%22%2C%22ResourceTitle%22%3A%22How%3C%2FA%3E%20to%20grow%20up%201%22%2C%22EntityPath%22%3A%22%2Fapi%2Fv%22%2C%22OperationDetails%22%3A%22%7B%5C%22Name%5C%22%3A%5C%22%3CSPAN%3EHow%20to%20grow%20up%201%3C%2FSPAN%3E%5C%22PrivacyMode%5C%22%3A%5C%22private%5C%22%7D%22%2C%22ClientApplicationId%22%3A%22cf53fce8-def6-4ae%22%2C%22ObjectId%22%3A%22%3CA%20href%3D%22https%3A%2F%2Fwww.microsoftstream.com%2F%22%20target%3D%22_blank%22%20rel%3D%22noopener%20nofollow%20noreferrer%22%3Ehttps%3A%2F%2Fwww.microsoftstream.com%2F%3C%2FA%3E%22%7D%3C%2FP%3E%3C%2FTD%3E%3C%2FTR%3E%3CTR%3E%3CTD%3E%26nbsp%3B%3C%2FTD%3E%3C%2FTR%3E%3C%2FTBODY%3E%3C%2FTABLE%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSTRONG%3EAppreciated%20your%20help.%3C%2FSTRONG%3E%3C%2FP%3E%3CP%3EJohn%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1998705%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EWindows%20PowerShell%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2000001%22%20slang%3D%22en-US%22%3ERe%3A%20How%20I%20can%20separately%20data%20in%201%20column%20from%20a%20csv%20file%20to%20others%20columns%20with%20header%20%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2000001%22%20slang%3D%22en-US%22%3E%3CP%3EHello%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F905425%22%20target%3D%22_blank%22%3E%40Johnn200%3C%2FA%3E%2C%3C%2FP%3E%3CP%3EIt%20looks%20like%20your%20AuditData%20is%20in%20Json%20notation.%3C%2FP%3E%3CP%3EPlease%20try%20to%20use%20%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fpowershell%2Fmodule%2Fmicrosoft.powershell.utility%2Fconvertfrom-json%3Fview%3Dpowershell-7.1%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3E%3CSTRONG%3EConvertFrom-Json%3C%2FSTRONG%3E%3C%2FA%3E%3C%2FP%3E%3CP%3ESimply%20pipe%20your%20%3CSTRONG%3EAuditData%3C%2FSTRONG%3E%20to%20%3CSTRONG%3EConvertFrom-Json%3C%2FSTRONG%3E%20and%20then%20you%20will%20be%20able%20to%20filter%20it%20easily.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EHope%20that%20helps.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2000646%22%20slang%3D%22en-US%22%3ERe%3A%20How%20I%20can%20separately%20data%20in%201%20column%20from%20a%20csv%20file%20to%20others%20columns%20with%20header%20%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2000646%22%20slang%3D%22en-US%22%3EPerfect%20comment%20Andy.%20Thank%20you%20very%20much%3CBR%20%2F%3E%3CBR%20%2F%3EI'm%20now%20can%20work%20with%20those%20data%20now.%20Learned%20new%20thing%20today.%3CBR%20%2F%3E%3CBR%20%2F%3EThank%20you.%3C%2FLINGO-BODY%3E
New Contributor

Dear supporter,

 

Thank you for your visit, I'm a very new with Powershell data array, I have a question and I hope you can help me:

 

I have a .csv file with 3 column, "Auditdata" is one of them and it contains too much data and I can't filter them. its data in format "Header":"data" 

 

Can you help me a solution to spit those data to others column with header please ? also if we not spit the data, is there any way we can select one of them, like example I just want to get "ResourceTitle" data only in column "Auditdata" ?

 

 

Here is data sample:

AuditData

{"ResourceUrl":"https://www.abc.com","ResourceTitle":"How to grow up 1","EntityPath":"/api/v","OperationDetails":"{\"Name\":\"How to grow up 1\"PrivacyMode\":\"private\"}","ClientApplicationId":"cf53fce8-def6-4ae","ObjectId":"https://www.microsoftstream.com/"}

 

 

 

Appreciated your help.

John

2 Replies
best response confirmed by Johnn200 (New Contributor)
Solution

Hello @Johnn200,

It looks like your AuditData is in Json notation.

Please try to use ConvertFrom-Json

Simply pipe your AuditData to ConvertFrom-Json and then you will be able to filter it easily.

 

Hope that helps.

Perfect comment Andy. Thank you very much

I'm now can work with those data now. Learned new thing today.

Thank you.