Import data from a JSON file

This example shows you how to implement a smart action to upload a JSON file. Here an activities model has a details field of the type JSON. This field should contain information from a JSON file.

Requirements

  • An admin backend running on forest-express-sequelize

How it works

Directory: /models

This directory contains the activities.js file where the activities model is declared.

Directory: /forest

This directory contains the activities.js file where the smart action Upload JSON is declared.

You need to specify that the widget file picker is applicable to the input field used to upload the file.

Directory: /routes

This directory contains the activities.js file where the logic of the smart action is implemented.

Last updated

Was this helpful?