erase json object from a file #289
Unanswered
barweizman
asked this question in
Q&A
Replies: 2 comments 1 reply
-
Here's one way:
Here's another way using jsonpath:
|
Beta Was this translation helpful? Give feedback.
1 reply
-
It's been added Erase an object with a specified key from an array, and the examples folder. Thanks for the contribution. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I got a JSON file (written below), and I want to erase the JSON object with the given id "756746783" (this is the first object in the example), with all its self-other attributes(e.g address, email..), How can I do that?
[
{
"address": "ashdod",
"email": "ron10@gmail.com",
"emergency contact name": "alon",
"emergency contact phone": "0535500127",
"first name": "ron",
"id": "756746783",
"last name": "cohen",
"password": "77ik2331",
"phone": "0526732996",
"reset password details": ["olga", "06.11.1995", "tennis"],
"salary": 3000,
"type": "manager",
"user name": "ron87"
},
{
"address": "ashdod",
"email": "nirlevy120@gmail.com",
"emergency contact name": "tal",
"emergency contact phone": "0548177765",
"first name": "nir",
"id": "11884398",
"last name": "levy",
"password": "68fnsd4",
"phone": "0578198932",
"reset password details": ["koral", "02.01.1989", "sleep"],
"salary": 4500,
"type": "manager",
"user name": "nir97"
}
]
Beta Was this translation helpful? Give feedback.
All reactions