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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / How to convert this ar...
Power Automate
Unanswered

How to convert this array of objects to a string array

(0) ShareShare
ReportReport
Posted on by 212

I need to convert this:

 

 "text_2": "[{\"email\":\"ptell@domain.com\"},{\"email\":\"jsmith@domain.com\"}]"

 

I'm getting this from a:

 

JSON(collection)

 

 in a PowerApp that triggers the flow.

My ultimate objective is to create SharePoint list items for each email.

I believe that I have to convert the first line of JSON above to a string array, so I can then use a split() function, to add to an array?

Help needed!

Thanks.

 

Categories:
I have the same question (0)
  • Manish Solanki Profile Picture
    15,169 Moderator on at

    Hi @cardinalnight 

     

    Here is the sample flow.

     

    I have stored the input array in compose action in this example:

    ManishSolanki_0-1699982625622.png

     "text_2": "[{\"email\":\"ptell@domain.com\"},{\"email\":\"jsmith@domain.com\"}]"

     

    Nex, add "Apply to each" action & to covert the input array to JSON write an expression as a input to this action. Expression needs to be written in the expression window as shown below:

    ManishSolanki_1-1699982788157.png

    json(concat('{',replace(replace(replace(outputs('Compose'),'\',''),'"[','['),']"',']'),'}'))?['text_2']

     

    Add Create item action inside apply to each action block to add the list items in SharePoint list. Here using expression, I am setting email addresses in Title field of SharePoint list:

    ManishSolanki_2-1699982969824.png
    item()?['email']

     

    If this helps & solves your problem, please remember to give a 👍 and accept my solution as it will help others in the future.

     

    Thanks

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Vish WR Profile Picture

Vish WR 862

#2
Valantis Profile Picture

Valantis 738

#3
Haque Profile Picture

Haque 553

Last 30 days Overall leaderboard