web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Power Automate - Building Flows
Unanswered

Json Array- Output as String Comma Between

(0) ShareShare
ReportReport
Posted on by 8

Hi- I'm a beginner with Power Automate and I've searched extensively for a solution to this.  I am pulling json objects from a connector that is a REST API.  If there are two names listed in the body named "soft credit" I want to return them with a comma in between.  Currently they appear as Donald DuckMickey Mouse if there is more than one.  I would like it to be Donald Duck, Mickey Mouse.  I'm tried many things including Parse Json then split, join, concatenate but I don't think I'm doing it correctly.  

cgrant88_0-1649253415965.png

Condition 2: length(outputs('Get_a_gift')?['body/soft_credits'])

Apply to each: {outputs('Get_a_gift')?['body/soft_credits']}
 
Here's what the soft credit body looks like. I am returning the constituent_id and then getting
the Name from get a constituent which is a string even though the soft credit is an array.
"soft_credits": [
{
"id": "300",
"amount": {
"value": 10
},
"constituent_id": "123456",
"gift_id": "00013"
},
{
"id": "301",
"amount": {
"value": 10
},
"constituent_id": "123457",
"gift_id": "00013"
}
]
Lastly, at the end of the flow I do append the value to an array with other fields.
Thank you for any help!
Carol
 

 

I have the same question (0)
  • Expiscornovus Profile Picture
    32,857 Most Valuable Professional on at
    Re: Json Array- Output as String Comma Between

    Hi @cgrant88,

     

    You could append the name property value to a array variable instead of a string variable. Outside of the apply to each loop you could use an expression to join the values together with a comma character.

     

    Below is an example of that approach.

     

     

    join(variables('Soft Credit String'), ', ')

     

    appendtoarrayvariable.png

  • cgrant88 Profile Picture
    8 on at
    Re: Json Array- Output as String Comma Between

    Thanks @Expiscornovus -

    I did try it (I think). 

    The "Name" field is a string so I did a compose then did Append to an Array. 

    What I'm getting now as a result is ["Donald Duck","Mickey Mouse","Goofy Dog"]  but it's looping through all of them so at the end I've got 15 names.   

    In the Compose I have join(variables('SC Array Name'),', ')

     

     

    cgrant88_0-1649345811326.png

    cgrant88_1-1649346035348.png

    Thank you for any more help!

    Carol

     

  • Expiscornovus Profile Picture
    32,857 Most Valuable Professional on at
    Re: Json Array- Output as String Comma Between

    Hi @cgrant88,

     

    How many soft credits items do you have in your apply to each loop? If you have 15 items that could be expected behaviour of the approach I suggested. It is appending the name per Soft credits item.

     

    If that is not what you want I might need to adjust the earlier example 😁

     

     

     

  • cgrant88 Profile Picture
    8 on at
    Re: Json Array- Output as String Comma Between

    Hi @Expiscornovus -

     I would not have 15 names in my soft credits.  At the most it would be 4.

    This is how the data is:

    Gift 1- Mickey MouseMinney Mouse

    Gift 2- blank (no soft credit)

    Gift 3- Donald DuckDaisy Duck

    Gift 4- Goofy Dog

    right now it is looping through all the gifts and returning Mickey Mouse, Donald Duck, Daisy Duck, Goofy Dog.

     

    Thank you.

    -Carol

  • Expiscornovus Profile Picture
    32,857 Most Valuable Professional on at
    Re: Json Array- Output as String Comma Between

    Hi @cgrant88,


    I am not familiar with the Blackbaud Raisers Edge NXT connectors (that is what you are using in this setup, correct?). But I will try and see if I can help you out 😁

     

    Can you share a screenshot of the whole flow? This way I can see which other actions you are using in the rest of your flow setup. I assume you are not only using a Get a gift action?

  • cgrant88 Profile Picture
    8 on at
    Re: Json Array- Output as String Comma Between

    @Expiscornovus 

    Thank you, but at some point I'm hoping other users that use the Raiser's Edge connector will come up with a solution for this.  I thought it might be an easy solution so I posted it here. 

     

    Thanks for taking a look though.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Chiara Carbone – Community Spotlight

We are honored to recognize Chiara Carbone as our Community Spotlight for November…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 691 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 431 Moderator

#3
developerAJ Profile Picture

developerAJ 266

Last 30 days Overall leaderboard