Select Fields Node

The Select Fields Node lets you pick and reshape specific fields from incoming data objects.

Build custom outputs by selecting only what you need from complex JSON.

Purpose

  • Data Reduction: Trim down large objects to only essential fields for next steps.
  • Simplification: Extract relevant info from complex/nested data.
  • Schema Adaptation: Prepare data for APIs/services that expect a smaller schema.
  • Focusing Data: Isolate key points for analysis, logging, or further processing.

Configuration

PropertyTypeDescriptionDefault
labelstring (optional)Descriptive name for the node instance.Select Fields
jsonPathsArray of PathEntryOrdered list of field paths to select from the input data.[] (empty array)

PathEntry Structure

Each entry in jsonPaths contains:

  • id: string — Unique ID for the path entry.
  • path: string — Path expression to select the field from input data.
  • enabled: boolean — If true, field is selected; if false, it is ignored.
  • Optional: alias to rename field in output. (Check if supported in your version.)
Path Syntax & Output Structure

Important: Clarify your path format (dot notation, JSONPath, etc).
The output structure can be:

  • Nested: {"user": {"address": {"city": "value"}}}
  • Flattened: {"city": "value"} or {"user.address.city": "value"}
  • Aliased: {"contactEmail": "value"}
    Missing fields: Are they omitted or set to null? Check your backend docs for the actual behavior.

Inputs and Outputs

Input (Left Handle):
Receives an object (typically JSON). Paths are evaluated against this object.

Output (Right Handle):
Emits a new object with only the selected fields, using the specified output structure (nested, flattened, or aliased).

Logic of Selection

  1. Data object arrives at the input handle.
  2. Node iterates over enabled jsonPaths.
  3. For each path, value is extracted and added to output (structure depends on config/alias).
  4. Final output object, containing just the selected fields, is emitted.

Example: Extracting Product Details

Input Data:

{
"product": {
  "id": "P123",
  "name": "Wireless Mouse",
  "category": { "id": "CAT01", "name": "Electronics" },
  "supplierInfo": {
    "supplierName": "TechParts Inc.",
    "supplierCode": "TP789"
  },
  "stock": 150,
  "price": 29.99
}
}

Node Configuration:

  • label: Get Product Essentials
  • jsonPaths:
    • id: 'p1', path: 'product.name', enabled: true
    • id: 'p2', path: 'product.price', enabled: true
    • id: 'p3', path: 'product.category.name', enabled: true

Possible Output (nested structure):

{
"product": {
  "name": "Wireless Mouse",
  "category": {
    "name": "Electronics"
  },
  "price": 29.99
}
}

Or (flattened/aliased):

{
"name": "Wireless Mouse",
"price": 29.99,
"categoryName": "Electronics"
}

Output structure (nested, flattened, or aliased) depends on node settings and backend implementation.

Notes and Considerations

  • Path Syntax: Be precise—refer to your node's path syntax docs.
  • Selection vs. Transformation: This node is for selecting. For renaming/transformation, consider the Transform Node if more logic is needed.
  • Order of Paths: Order typically does not affect output, unless there are duplicate target keys.

The Select Fields Node helps you keep only what's essential, making downstream automation cleaner and faster.

Loading search features...