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
Former Employee

I believe you want to use .join()


Diane Miller

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.