Showing results for 
Search instead for 
Did you mean: 
Not applicable

Replace invalid characters in an Object's outputs



I have a form from which I'm trying to sanitize the text fields. For this, I put every invalid characters in an array variable, and I wanted to apply to each field a replace() expression, in which I get rid of the invalid chars. I have achieved this so far with this tutorial :


The problem is, the first parameter of the replace() expression has to be a string, and my fields are all returned in an Object. I don't know how I can achieve this. I was thinking of maybe putting all the fields in an array, and then looping through it to change every field one by one, but I'm not sure if that's right. Does anyone know how to achieve this ?



Solution Sage
Solution Sage

Can you show us an example of the Object you are using?


Is it a JSON Object or what? 


Please click Accept as Solution if it resolved your problem or give it a Thumbs Up if it helped you in anyway this will allow other people to search correct solutions effectively.


Not applicable

Hello @Rahber,

Here's what the Object looks like : 

Capture d’écran 2021-06-14 084344.png












It is a JSON Object.

Helpful resources

Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

Power Automate Designer Feedback_carousel.jpg

Help make Flow Design easier

Are you new to designing flows? What is your biggest struggle with Power Automate Designer? Help us make it more user friendly!

Users online (3,688)