PluginData.set
Sets the value for a specific key
PluginData.set() method
Sets the value for a specific key
Signature:
set(key: string, value: string): void;Parameters
Parameter | Type | Description |
|---|---|---|
key | string | The key to set |
value | string | The value to set. If you want to set non-string values, you can serialize them to a string (e.g. using JSON.stringify) before storing. |
Returns:
void
Remarks
Will throw an error if setting this key-value pair would exceed the plugin's data quota for this node
Example
// setting a string value
node.data.set("storedColors", "#FF0000");
// setting a non-string value
const colors = ["#FF0000", "#00FF00", "#0000FF"];
node.data.set("storedColors", JSON.stringify(colors));
// getting the stringified value back
const storedColors = JSON.parse(node.data.get("storedColors"));Last updated: August 5, 2026 at 11:47 AMEdit this page