I have a JSON response and I need to remove a property including the value and add it to a new list parsed in a JSON object as a response.
The JSON response is:
[
{
"bookmark": "bla",
"entity_name": "aag",
"id": 56
},
{
"bookmark": "ag",
"entity_name": "dsg",
"id": 34
},
{
"bookmark": "agds",
"entity_name": "dsaga",
"id": 12
}
...
]
I want to ammend this but splicing some of its properties (e.g. 'bookmark') and send it back as a JSON object.
It goes like this.
[
{
"entity_name": "aag",
"id": 56
},
{
"entity_name": "dsg",
"id": 34
},
{
"entity_name": "dsaga",
"id": 12
}
...
]
I have tried many ways but can't seem to get my desired output as above.
if the new list is similar to above:
return jsonify(newList)
Any suggestions would be highly helpful. Thank you
bookmarkkey out?