jointjs
Version:
JavaScript diagramming library
15 lines (13 loc) • 478 B
HTML
<pre class="docs-method-signature"><code>util.setByPath(object, path, value, delim)</code></pre><p>Set a <code>value</code> at the <code>path</code> in a nested <code>object</code>. <code>delim</code> is the
delimiter used in the <code>path</code>. Returns the augmented <code>object</code>.</p>
<pre><code>joint.util.setByPath({ a: 1 }, 'b/bb/bbb', 2, '/');
/*
{
"a": 1,
"b": {
"bb": {
"bbb": 2
}
}
}
*/</code></pre>