Extract JSON Value

The SparkLite API plugin returns outputs as JSON text. You will need to extract the JSON value with regex or plugin. This page shows you how to extract a specific value with the plugin "JSON Machine".

Install the plugin

Open your Bubble app editor. Navigate to the tab "Plugins". Click the button "Add plugin".​Write a caption​

Search for "JSON Machine". Click the button "Install".

Configure the plugin element

Add a "read JSON" element to the page. The field "key" is the name of the value you want to extract. And the field "json text" is the JSON text returned by the SparkLite API.

The plugin will automatically detect the value type and expose the state. For example, the value of "HoursDifference" is a number. You can get the number value with the dynamic expression "readJSON's number value".

Last updated