Supprime un élément de données JSON défini par un nom d'objet, un index de tableau ou un chemin d'accès.
JSONDeleteElement ( json ; cléOuIndexOuChemin )
json
: une expression ou une rubrique de type Texte qui contient un objet ou un tableau JSON.
cléOuIndexOuChemin
: une expression ou une rubrique de type Texte qui spécifie un nom d'objet, un index de tableau ou un chemin d'accès JSON. Consultez la section Utilisation des fonctions JSON.
Texte
16.0
Supprime un élément d'un objet JSON.
JSONDeleteElement ( "{ \"a\" : 11 , \"b\" : 12 , \"c\" : 13 }" ; "b" )
renvoie {"a":11,"c":13}.
Supprime un élément d'un objet JSON imbriqué. Si la variable $$JSON est définie sur
{
"a" :
{
"id" : 12,
"lien" : false
}
}
alors
JSONFormatElements (
JSONDeleteElement ( $$JSON ; "a.lien" )
)
Résultat
{
"a" :
{
"id" : 12
}
}