Instructions
TUTORIAL — JSON Search
1) Add the element
Install the plugin in your Bubble app and drag “Json Search” onto the page. This is a utility element, so it can remain 1 px wide and 1 px high.
2) Provide the JSON
In the “JSON text” property, provide a valid JSON string. Example:
{
"customer": {
"name": "Ana",
"address": { "city": "São Paulo" }
},
"items": [
{ "name": "Product A", "price": 10 },
{ "name": "Product B" },
{ "name": "Product C", "price": 20 }
],
"active": true
}
3) Run a search in a workflow
Create a workflow, for example “When Button Search is clicked”.
Add the action “Json Search → Get value”.
Select the element in the “Element” field and enter the path in the “Path” field.
The Path field accepts dynamic values from Bubble.
4) Supported paths
• customer.name → Ana
• customer.address → the complete object as JSON: {"city":"São Paulo"}
• customer.address.city → São Paulo
• items → the complete array as JSON
• items[0] → the first object in the array
• items[0].price → 10
• items.price → a projected list with all prices: [10,20]
• items.name → a projected list with all found names: ["Product A","Product B","Product C"]
During array projection, items that do not contain the requested key are omitted. Therefore, in the example above, items.price returns [10,20] and does not include the second item.
5) Read the element states
• Result: the final value always as text. Objects and arrays remain valid JSON text.
• Result type: string, number, boolean, null, object, or array.
• Success: yes when the search completes successfully; no when an error occurs.
• Error message: details about the problem; it is cleared after a successful search.
6) Use the events
• “When Json Search value is retrieved”: continue the workflow when Success is yes.
• “When Json Search an error occurs”: show Error message or handle the failure.
7) Common errors
• JSON text is invalid: the content cannot be parsed by JSON.parse.
• JSON text is empty: provide JSON before running the action.
• Path is empty: provide a path.
• Path "..." was not found: the key does not exist or the index is outside the array.
• Array indexes must be non-negative integers: use values such as [0] or [12].
Notes:
• Automatic array projection uses the items.price format; you do not need to use * or [].
• Array indexes start at zero.
• Keys containing dots (for example, "full.name") are not supported as one literal key.
• The plugin processes JSON in the browser and does not send the JSON content to an external service.