difference to mutations

This block is part of the mutations group and was last modified in core v14.0.3.

difference to mutations v9.2.5 Updated v14.0.3

generates an array of mutations representing the differences between two objects.

In pins 2
  • original
    object
  • modified required
    object
Out pins 1
  • mutations
    mutations

Emits the mutations that turn original into modified: field.remove for every flattened key missing or null in modified, set.field for every added or changed non-null value. Nested objects flatten to dot paths, _meta is ignored, and numbers compare by value (5 equals 5.0). An unwired original treats every modified field as new.

A typical wiring for difference to mutations: new object feeds the modalTypes pin; the mutations out pin feeds create document.

Studio canvas example for the difference to mutations block: typical wiring for difference to mutations.

Commonly used with

In production blueprints, this block is most often wired together with:

  • get fields: feeds into this block. Gets the selected fields from the given object.
  • create document: this block feeds into it. Creates a document in the given storage.
  • update document: this block feeds into it. Update document in the given storage and creates a revision for it.

Version history

Introduced in v9.2.5.

Last modified in v14.0.3.


Back to mutations Return to the main group to view all sub-groups Back to object Return to the group to view all blocks within this group