3

i have so many line just like this json code (120000 lines)

{
"name":"V83.9",
"name":"Work",
"name":"V83.9",
"name":"Education",
"name":"V83.9",
"name":"Profession"
}

and i want this convert just like this

{
"name":"V83.9",
"name":"Work",
"name":"Education",
"name":"Profession"
}

and i wrote regex on vscode just like this but this is not working

Find: {\n"name":"$1",\n"name":"$2",\n"name":"$1",\n"name":"$3",\n"name":"$1",\n"name":"$4"\n}

Replace: {\n"name":"$1",\n"name":"$2",\n"name":"$3",\n"name":"$4"\n}

How do i do this?

4
  • it's a duplicate question.. please take a look @ the below: stackoverflow.com/questions/37992493/… Commented Mar 4, 2019 at 14:53
  • @MichelHanna then can you fix this solution? this duplicate question not fix my solution Commented Mar 4, 2019 at 14:57
  • 1
    Possible duplicate of How to remove duplicate lines in Visual Studio Code? Commented Mar 5, 2019 at 2:20
  • Are lines 3 and 5 always duplicates of line 1? Commented Mar 5, 2019 at 2:25

1 Answer 1

4

Please check the Transformer extension, where i have applied it on your example and it works:

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.