L'objet Hash passé en paramètre doit être un objet créé par la fonction "createSimpleHash".
Paramètres
Hash |
removeInThisHash |
Objet Hash dont on veut supprimer un ou des attributs |
Obligatoire |
String |
attrToRemove |
Nom de l'attribut à supprimer. |
Obligatoire |
Par exemple
<#assign copiedHash = {"attr1": 1, "attr2":true, "attr3":false, "attr4":4, "attr5":"ok", "attr6":14.5, "attr7":[4, 44] } /> <#assign removeInThisHash = hardisCore.createSimpleHash(copiedHash) /> <#-- Remove one attribute in removeInThisHash --> <#assign noUse = hardisCore.removeFromSimpleHash(removeInThisHash , "attr1") /> <#-- Remove two attributes in removeInThisHash --> <#assign noUse = hardisCore.removeFromSimpleHash(removeInThisHash , ["attr2", "attr3"]) /> <#-- Remove all attributes in removeInThisHash --> <#assign noUse = hardisCore.removeFromSimpleHash(removeInThisHash , removeInThisHash?keys) />
↑ Haut de page Copyrights Ι ©Hardis Group 2025 - Toute représentation ou reproduction intégrale ou partielle faite sans le consentement écrit d'Hardis Group est illicite.