---
title: "Object"
description: "Object utilities for paths, merge, comparison, JSON, and callback map."
canonical_url: "https://docs.vettero.com/build/workflows/blocks/data-ops/object"
---
# Object

> Object utilities for paths, merge, comparison, JSON, and callback map.

<block-meta block="Yes" channels="Any" folder="basic/data-ops" group="Data Operations" groupTo="/build/workflows/blocks/data-ops" icon="i-lucide-boxes" pipe="Value" scope="Any" tool="No" type="data-ops.object">



</block-meta>

**Object** (canvas label **Object ·** plus the operation) runs one object **Operation** and writes the result to the data pipe. **Path (dot notation)** uses dotted keys (for example `address.city`).

**Map values** and **Map keys** need the **Callback** handle connected to a [Lambda](https://docs.vettero.com/build/workflows/blocks/module/lambda). Other operations do not use that handle.

Use [Create Object / Array](https://docs.vettero.com/build/workflows/blocks/data-ops/create-object) to build a structure from scratch. Use [For In](https://docs.vettero.com/build/workflows/blocks/loops/for-in) when you want a full loop body over keys.

## Configure

<table>
<thead>
  <tr>
    <th>
      Setting
    </th>
    
    <th>
      Description
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      <strong>
        Operation
      </strong>
    </td>
    
    <td>
      Grouped list. Changing it resets the other fields
    </td>
  </tr>
  
  <tr>
    <td>
      Remaining fields
    </td>
    
    <td>
      Depend on <strong>
        Operation
      </strong>
    </td>
  </tr>
</tbody>
</table>

For **Map values** and **Map keys**, connect **Callback** to [Lambda](https://docs.vettero.com/build/workflows/blocks/module/lambda). The run fails if it is not connected.

## Handles

<table>
<thead>
  <tr>
    <th>
      Handle
    </th>
    
    <th>
      Role
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      <strong>
        In
      </strong>
      
       (target)
    </td>
    
    <td>
      Incoming connection
    </td>
  </tr>
  
  <tr>
    <td>
      <strong>
        Out
      </strong>
      
       (source)
    </td>
    
    <td>
      Continues after the operation (main path)
    </td>
  </tr>
  
  <tr>
    <td>
      <strong>
        Callback
      </strong>
    </td>
    
    <td>
      Shown for map operations. <strong>
        New callback scope
      </strong>
      
       per key. Connect to <a href="https://docs.vettero.com/build/workflows/blocks/module/lambda">
        Lambda
      </a>
    </td>
  </tr>
</tbody>
</table>

Inside the map body (after Lambda):

<table>
<thead>
  <tr>
    <th>
      Path
    </th>
    
    <th>
      Meaning
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      <code>
        args.key
      </code>
    </td>
    
    <td>
      Current key
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        args.value
      </code>
    </td>
    
    <td>
      Current value
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        args.index
      </code>
    </td>
    
    <td>
      Zero-based index
    </td>
  </tr>
</tbody>
</table>

End the body with a **return**. **Map keys** must return a non-empty key string. **Map values** returns the new value for that key.

## Pipe schema

The next block on the main path reads this on the data pipe (`pipe.value`). The type depends on **Operation**: object, list, text, number, true/false, or any (**Get**).

## Operations

### Core

<table>
<thead>
  <tr>
    <th>
      Operation
    </th>
    
    <th>
      Result
    </th>
    
    <th>
      Inputs
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      <strong>
        Create
      </strong>
    </td>
    
    <td>
      object
    </td>
    
    <td>
      Optional <strong>
        Entries [key, value]<span>
          
        </span>
      </strong>
    </td>
  </tr>
  
  <tr>
    <td>
      <strong>
        Clone
      </strong>
    </td>
    
    <td>
      object
    </td>
    
    <td>
      <strong>
        Object
      </strong>
      
       — deep copy
    </td>
  </tr>
  
  <tr>
    <td>
      <strong>
        Is empty
      </strong>
    </td>
    
    <td>
      true/false
    </td>
    
    <td>
      <strong>
        Object
      </strong>
    </td>
  </tr>
  
  <tr>
    <td>
      <strong>
        Size
      </strong>
    </td>
    
    <td>
      number
    </td>
    
    <td>
      <strong>
        Object
      </strong>
      
       — own keys
    </td>
  </tr>
</tbody>
</table>

### Access

<table>
<thead>
  <tr>
    <th>
      Operation
    </th>
    
    <th>
      Result
    </th>
    
    <th>
      Inputs
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      <strong>
        Get
      </strong>
    </td>
    
    <td>
      any
    </td>
    
    <td>
      <strong>
        Object
      </strong>
      
      , <strong>
        Path (dot notation)
      </strong>
    </td>
  </tr>
  
  <tr>
    <td>
      <strong>
        Set
      </strong>
    </td>
    
    <td>
      object
    </td>
    
    <td>
      <strong>
        Object
      </strong>
      
      , <strong>
        Path
      </strong>
      
      , <strong>
        Value
      </strong>
    </td>
  </tr>
  
  <tr>
    <td>
      <strong>
        Has
      </strong>
    </td>
    
    <td>
      true/false
    </td>
    
    <td>
      <strong>
        Object
      </strong>
      
      , <strong>
        Path
      </strong>
    </td>
  </tr>
  
  <tr>
    <td>
      <strong>
        Remove
      </strong>
    </td>
    
    <td>
      object
    </td>
    
    <td>
      <strong>
        Object
      </strong>
      
      , <strong>
        Path
      </strong>
    </td>
  </tr>
</tbody>
</table>

### Keys, values, transform

<table>
<thead>
  <tr>
    <th>
      Operation
    </th>
    
    <th>
      Result
    </th>
    
    <th>
      Inputs
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      <strong>
        Keys
      </strong>
      
       / <strong>
        Values
      </strong>
      
       / <strong>
        Entries
      </strong>
    </td>
    
    <td>
      list
    </td>
    
    <td>
      <strong>
        Object
      </strong>
    </td>
  </tr>
  
  <tr>
    <td>
      <strong>
        Map values
      </strong>
      
       / <strong>
        Map keys
      </strong>
    </td>
    
    <td>
      object
    </td>
    
    <td>
      <strong>
        Object
      </strong>
      
       plus <strong>
        Callback
      </strong>
    </td>
  </tr>
  
  <tr>
    <td>
      <strong>
        Pick
      </strong>
      
       / <strong>
        Omit
      </strong>
    </td>
    
    <td>
      object
    </td>
    
    <td>
      <strong>
        Object
      </strong>
      
      , <strong>
        Keys (string array)
      </strong>
    </td>
  </tr>
  
  <tr>
    <td>
      <strong>
        Invert
      </strong>
    </td>
    
    <td>
      object
    </td>
    
    <td>
      <strong>
        Object
      </strong>
      
       — keys and stringified values swapped
    </td>
  </tr>
</tbody>
</table>

### Merge

<table>
<thead>
  <tr>
    <th>
      Operation
    </th>
    
    <th>
      Result
    </th>
    
    <th>
      Inputs
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      <strong>
        Assign
      </strong>
    </td>
    
    <td>
      object
    </td>
    
    <td>
      <strong>
        Target
      </strong>
      
      , <strong>
        Sources (object array)
      </strong>
      
       — shallow
    </td>
  </tr>
  
  <tr>
    <td>
      <strong>
        Merge
      </strong>
    </td>
    
    <td>
      object
    </td>
    
    <td>
      <strong>
        Objects (array)
      </strong>
      
       — deep
    </td>
  </tr>
  
  <tr>
    <td>
      <strong>
        Defaults
      </strong>
    </td>
    
    <td>
      object
    </td>
    
    <td>
      <strong>
        Object
      </strong>
      
      , <strong>
        Defaults
      </strong>
      
       — fill missing keys
    </td>
  </tr>
</tbody>
</table>

### Comparison, validation, JSON

<table>
<thead>
  <tr>
    <th>
      Operation
    </th>
    
    <th>
      Result
    </th>
    
    <th>
      Inputs
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      <strong>
        Equals
      </strong>
    </td>
    
    <td>
      true/false
    </td>
    
    <td>
      <strong>
        A
      </strong>
      
      , <strong>
        B
      </strong>
      
       — deep
    </td>
  </tr>
  
  <tr>
    <td>
      <strong>
        Is match
      </strong>
    </td>
    
    <td>
      true/false
    </td>
    
    <td>
      <strong>
        Object
      </strong>
      
      , <strong>
        Subset
      </strong>
    </td>
  </tr>
  
  <tr>
    <td>
      <strong>
        Is plain object
      </strong>
      
       / <strong>
        Is array
      </strong>
      
       / <strong>
        Is null
      </strong>
      
       / <strong>
        Is undefined
      </strong>
    </td>
    
    <td>
      true/false
    </td>
    
    <td>
      <strong>
        Value
      </strong>
    </td>
  </tr>
  
  <tr>
    <td>
      <strong>
        To JSON
      </strong>
    </td>
    
    <td>
      text
    </td>
    
    <td>
      <strong>
        Object
      </strong>
    </td>
  </tr>
  
  <tr>
    <td>
      <strong>
        From JSON
      </strong>
    </td>
    
    <td>
      object
    </td>
    
    <td>
      <strong>
        JSON string
      </strong>
      
       — root must be an object
    </td>
  </tr>
</tbody>
</table>

### Helpers

<table>
<thead>
  <tr>
    <th>
      Operation
    </th>
    
    <th>
      Result
    </th>
    
    <th>
      Inputs
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      <strong>
        Flatten
      </strong>
    </td>
    
    <td>
      object
    </td>
    
    <td>
      <strong>
        Object
      </strong>
      
      , optional <strong>
        Prefix
      </strong>
      
       — dotted keys
    </td>
  </tr>
  
  <tr>
    <td>
      <strong>
        Unflatten
      </strong>
    </td>
    
    <td>
      object
    </td>
    
    <td>
      <strong>
        Object
      </strong>
      
       — expand dotted keys
    </td>
  </tr>
  
  <tr>
    <td>
      <strong>
        Deep freeze
      </strong>
    </td>
    
    <td>
      object
    </td>
    
    <td>
      <strong>
        Object
      </strong>
    </td>
  </tr>
  
  <tr>
    <td>
      <strong>
        Diff
      </strong>
    </td>
    
    <td>
      object
    </td>
    
    <td>
      <strong>
        A
      </strong>
      
      , <strong>
        B
      </strong>
    </td>
  </tr>
  
  <tr>
    <td>
      <strong>
        Patch
      </strong>
    </td>
    
    <td>
      object
    </td>
    
    <td>
      <strong>
        Object
      </strong>
      
      , <strong>
        Changes
      </strong>
    </td>
  </tr>
</tbody>
</table>

## Use case

- **Get** `customer.email` from an API object, then send mail.
- **Pick** a subset of keys before [Table Insert](https://docs.vettero.com/build/workflows/blocks/table/insert).
- **Map values** to normalize each field through a small callback graph.

<block-page-nav>



</block-page-nav>


## Sitemap

See the full [sitemap](https://docs.vettero.com/sitemap.md) for all pages.
