Fork me on GitHub

set

Allows setting object values

The set transform allows to add/modify values in an object-formatted datapoint.

[
  {},
  {"foo": "baz"},
  {"a": 1,"b":2}
]

With the above data, and the transform set("foo","bar"), we get:

[
  {"foo":"bar"},
  {"foo": "bar"},
  {"a": 1,"b":2,"foo":"bar"}
]

Remember that PipeScript has native support for json-formatted data. You can directly set objects with transforms like the following:

{"foo": "bar", "a": $("a")}

Transform Details

One-To-OneStatelessPeekInput SchemaOutput Schema
TrueTrueFalse

Arguments

#DescriptionOptionalConstantHijackedDefault
1The name of field to setFalseTrueFalse
2The value to set the field toFalseFalseFalse

This Site

Contribute

ConnectorDB is a very new open-source project. If you are a designer/developer or ML enthusiast, head on over to the connectordb github, where you can choose which part of ConnectorDB you want to contribute towards! Pull requests or bug reports are welcome!