In a workflow when I make a partial update and set the path to a new property (which is also in a new nested object) and it adds the object and the property.
After the object structure exists the javascript works but it does not create the objects and properties. So what is partial update doing under the hood?
Something more complex?
// Step 1 - make sure fall exists and initialize to a blank object if not
if(!variables[/* fall_updates */‘3d4de373-5b9a-48ee-8b56-8955b668b341’][‘fall’]) variables[/* fall_updates */‘3d4de373-5b9a-48ee-8b56-8955b668b341’][‘fall’] = {};
// Step 2 - make sure the case exists andset it to a blank object if not
if(!variables[/* fall_updates */‘3d4de373-5b9a-48ee-8b56-8955b668b341’][‘fall’][‘ff40c4fe-c410-4ae1-96ba-bcaea61a2f58’]) variables[/* fall_updates */‘3d4de373-5b9a-48ee-8b56-8955b668b341’][‘fall’][‘ff40c4fe-c410-4ae1-96ba-bcaea61a2f58’] = {}
// Step 3 - update the test variable
variables[/* fall_updates */‘3d4de373-5b9a-48ee-8b56-8955b668b341’][‘fall’][‘ff40c4fe-c410-4ae1-96ba-bcaea61a2f58’][‘test’]=“test”;
You could use the npm plugin to add lodash that way. I haven’t confirmed this would work- only some npm packages do. I made a video on using the npm functionality with weweb:
I checked - the lodash.set npm package will successfully import a window function called “set” that is the lodash set function. I looked at it in the editor - it does not appear to conflict with weweb internals.