cancel
Showing results forย 
Search instead forย 
Did you mean:ย 

Converting Array to Comma Separated String

travis_pendleto
New Contributor II

I have JSON output from a Salesforce SOQL snap, in the format

[
{
โ€œQualifiedApiNameโ€: โ€œAccelerator_Pack__cโ€
},
{
โ€œQualifiedApiNameโ€: โ€œAccess_Certifications__cโ€
},
{
โ€œQualifiedApiNameโ€: โ€œAccess_Requests__cโ€
},
{
โ€œQualifiedApiNameโ€: โ€œAccount_Cleansed__cโ€
},
{
โ€œQualifiedApiNameโ€: โ€œAccount_Contract_Status__cโ€
}
]

I am trying to convert it to a string in the format " ```
Accelerator_Pack__c, Access_Certifications__c, Access_Requests__c, Account_Cleansed__c, Account_Contract_Status__" so I can use it dynamically in the SELECT clause of another query.

I thought the .toString function would do this, but as you can see in the image of my mapper snap, itโ€™s not making any change to the structure.

mapper

Any help would be appreciated!

1 ACCEPTED SOLUTION

travis_pendleto
New Contributor II

I bet that would work too. I got a solution from someone on Stack, I piped the QualifiedApiName into a Concat snap, then replaced the โ€œ|โ€ with โ€œ,โ€ in a mapper snap.

View solution in original post

2 REPLIES 2

dmiller
Admin Admin
Admin

I believe you want to use .join()


Diane Miller
Community Manager

travis_pendleto
New Contributor II

I bet that would work too. I got a solution from someone on Stack, I piped the QualifiedApiName into a Concat snap, then replaced the โ€œ|โ€ with โ€œ,โ€ in a mapper snap.