Reformat JSON output - single quotes

Sasha Sasha 200 Reputation points
2024-01-04T20:22:32.3666667+00:00

I need to reformat a JSON output that I received from a CSV file. The specific issue is with the value "Prop_2":"Horse'", where I want to replace the single quote. I attempted to use the expression replace(@{variables('JsonData')},''', '*'), but it didn't yield the expected result.

Can you advise on the correct way to format the JSON output to achieve my goal?

Azure Data Factory
Azure Data Factory
An Azure service for ingesting, preparing, and transforming data at scale.
0 comments No comments
{count} votes

Answer accepted by question author
  1. Amira Bedhiafi 41,121 Reputation points Volunteer Moderator
    2024-01-04T20:25:01.0766667+00:00

    You can use this expression :

    @replace(variables('var1'),'''','*')
    

    Check this thread, it is similar to your issue : https://stackoverflow.com/questions/77730234/how-to-replace-single-quote-in-json-with-a-special-character-in-azure-data-facto

    1 person found this answer helpful.
    0 comments No comments

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.