How to remove string from speciifif line form text file

hello,

i have one json text file and i need to remove comma from line number 974


how can i achieve that

Hi @Mathkar_kunal

You can read the whole data as String
Read Text file: output is stored in StrData

Use two assign activities.

strData= StrData.TrimEnd(" ,]}".ToCharArray)

StrData=StrData+“}]}”
image

That would do what you need.

Or you can use
image

strData=strData.Remove(strData.LastIndexOf(“,”),1)

This would remove the last occurence of Comma, making your JSON body perfect.

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.