cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
mmihir82
Level: Powered On

Extract string from array into json

Hello, Need help to extract string from the array. I have extract a email and split them by "space" into array. It depends on emails, it won't be the same array index. Here is the output [ "Maintenance", "#:", "12355110", "\n\nSummary:", "will", "perform", "scheduled", "maintenance", "to", "troubleshoot", "and", "clear", "network\nalarms", "services.\n\nUpdates:", "\n\n2019-01-01", "19:34:39", "GMT", "-", "This", "maintenance", "is", "scheduled.\n\nCustomer", "Impact:", "\n\n12355110-1", "\nStartEnd2019-01-29", "05:00", "GMT", "(Greenwich", "Mean", "Time)2019-01-02", "10:00", "GMT\n(Greenwich", "Mean", "Time)2019-01-02", "00:00", "EST", "(Eastern", "Standard", "Time)2019-01-29\n05:00", "EST", "(Eastern", "Standard", "Time)\n\nMaintenance", "Location(s):", "CAMBRIDGE,", "MA", ] Desired results: Maintenance#: 12355110 StartDate: 2019-01-02 StartTime: 05:00 GMT EndDate: 2019-01-02 EndTime: 10:00 GMT Maintenance Location: CAMBRIDGE, MA
3 REPLIES 3
Community Support Team
Community Support Team

Re: Extract string from array into json

Hi @mmihir82,

 

Are you trying to extract contents from email body?

If the email body is always in the same format, please take the following thread for a reference:

https://powerusers.microsoft.com/t5/Building-Flows/Read-email-content-from-body-of-the-email-extract...

You could try to use functions to get StartDate, EndDate, etc.

Please try it and feel free post back if you need more help.

 

Best regards,

Mabel

Community Support Team _ Mabel Mao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
mmihir82
Level: Powered On

Re: Extract string from array into json

Hello Mabel,

Thanks for responding. Let me try that approach, as I as split the "Html to text" into an array. But the content might change and so do the array, so that won't work, unless, I can use regex to find the string. but I don't how to do it.

 

Thanks

 

Community Support Team
Community Support Team

Re: Extract string from array into json

Hi @mmihir82,

 

It should work as long as your email body is always in the same format.

If you need more help, please feel free post back with more details on your email body and what you are going to extract from the body so that I will help figure out a flow.

 

Best regards,

Mabel

Community Support Team _ Mabel Mao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

firstImage

Incoming: New and improved badges!

We've given our badges an overhaul and also added some brand new ones!

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Power Automate Community Video Gallery!

Top Kudoed Authors
Users Online
Currently online: 128 members 5,311 guests
Please welcome our newest community members: