Skip to main content

Import from JSON file

This node allows you to upload a JSON file and access its data.

The Import from JSON file node parses a JSON file and exposes its top-level keys as output ports.

The Import from JSON file node is a utility for loading static data or configuration from a file. When you upload a file, the node parses the JSON content. If the JSON is an object, it dynamically creates output ports for each key in the object. If it's an array, it outputs the full array.

Inputs

Control

SignalDescription
UploadOpens the file picker dialog to select a JSON file.
UpdateRe-processes the loaded data and refreshes the outputs.

Outputs

Control

SignalDescription
DoneTriggered when the file is successfully parsed and data is ready.

Data

DataDescription
DataThe full parsed JSON object or array.
*Dynamic outputs corresponding to the keys in the uploaded JSON object (e.g., "Config", "Users").

Usage

Loading Config

  1. Create a file: .
  2. Trigger Upload and select the file.
  3. The node will show outputs and .
  4. Connect these to your app logic.

Detailed Behavior

  • Dynamic Ports: The node analyzes the JSON structure immediately upon upload. If the structure changes (e.g., you upload a different file), the ports will update.
  • Persistence: The loaded data is stored in the node's internal state but is not saved with the project file (it's a runtime import).

Troubleshooting

  • Invalid JSON: If the file contains syntax errors, the node will fail silently or log an error to the console. Ensure your JSON is valid.