Reputation: 165
String example
[{"identifier" : "value1"},{"identifier" : "value2"}]
Desired output
value1,value2
I will be using powershell for this, have gone though the string and its methods but can't put my finger on how. Any and all help will be appreciated.
Upvotes: 0
Views: 73
Reputation: 59031
I think you should have provided more information in order to get a better answer. To solve your problem, you could deserialize the JSON(or load the file first) using the ConvertFrom-Json
cmdlet, select the identifier
property and finally -join
the result:
('[{"identifier" : "value1"},{"identifier" : "value2"}]' | ConvertFrom-Json).identifier -join ','
Then you get your desired output:
value1,value2
Upvotes: 3