how can i remove a Array from a JSON with a generated ID.
So i have a JSON Like:
{
"Artikel":[
{ "id:1, artikelnr": "23453345", "anzahl": 22},
{ "id:2, artikelnr": "asd323", "anzahl": 2223},
{ "id:5, artikelnr": "dfsdf3893", "anzahl": 72},
{ "id:6, artikelnr": "asdikr38", "anzahl": 86},
{ "id:9, artikelnr": "2sad34533asd45", "anzahl": 10}
]
}
and i like to remove the json for example with the id 6, then the JSON should look like:
{
"Artikel":[
{ "id:1, artikelnr": "23453345", "anzahl": 22},
{ "id:2, artikelnr": "asd323", "anzahl": 2223},
{ "id:5, artikelnr": "dfsdf3893", "anzahl": 72},
{ "id:9, artikelnr": "2sad34533asd45", "anzahl": 10}
]
}
how can i make this?