Hi ,
I have a text a file with below kind of content. If we see the content the line which starting with the word “displayName”: came Successively (one after another) in some places of this content, not in all places.
I want to delete one line out of two lines if it Successively comes up only. After deleting no space also should be there in the place of deleted line. i searched in google to get this snippet in PowerShell, but no luck… please help.
“buildNumber”: “20210208.2”,
“result”: “succeeded”,
“name”: “LDAP”,
“displayName”: “Marks kim”,
“buildNumber”: “20210208.1”,
“result”: “succeeded”,
“name”: “BESS”,
“displayName”: “Phils.john”,
“displayName”: “Phils.john”,
“buildNumber”: “222290”,
“result”: “succeeded”,
“name”: “ELTS”,
“displayName”: “Phils.john”,
“buildNumber”: “222168”,
“result”: “succeeded”,
“name”: “BESS”,
“displayName”: “Phils.john”,
“displayName”: “Phils.john”,
“buildNumber”: “221393”,
“result”: “succeeded”,
“name”: “MKIS”,
“displayName”: “Phils.john”,
“buildNumber”: “222298”,
“result”: “succeeded”,
“name”: “ELTS”,
“displayName”: “Phils.john”,