Reputation: 3454
I have a large json list that has this structure
{
"name": "my name",
"description": "my description",
"image": "image.png",
"id": 1
},
{
"name": "my name",
"description": "my description",
"image": "image.png",
"id": 2
}
...
My list is 100 items long. Is there a way to remove the "id" property (and value) from all the objects in the list using notepad++?
Upvotes: 0
Views: 3516
Reputation: 23
I would say just use the find & replace function: For example:
You want to remove the property image, just use:
Find = "image": ".*",
Replace =
Search Mode = Regular expression
Upvotes: 1
Reputation: 91385
,\s+"id":.+
LEAVE EMPTY
. matches newline
Explanation:
, # a comma
\s+ # 1 or more spaces, including linebreak
"id": # literally
.+ # 1 or more any character but newline
Screenshot (before):
Screenshot (after):
Upvotes: 4