removeItem
To remove a key-value pair from a given JSON object
This function allows you to remove key-value pairs from an already existing JSON object.
If your JSON object is stored in a variable, it will be modified even if the return value is not stored in the variable again.
removeItem(JSON, string)
JSON
removeItem(object, key)
Removes a given key-value pair from a given JSON object.1
let data := {
2
lastName: "Rogers",
3
firstName: "Brian"
4
};
5
removeItem(data, "firstName")
Result: The
data
object is changed: The key-value pair with the firstName
key is deleted.Last modified 7mo ago