Forum Documentation Showcase Pricing Learn more

Get a list of things as an object usable in Javascript

Hi everyone,

Let’s say I have a type of data Book.

How can I get a list of all these books in the Toolbox Plugin -> Run Javascript -> Do search for…

It’s apparently impossible I am obliged to “Do search for” a specific value in a Book like its name.

I would like to Do search for All Books and pass the result as an object in a Javascript fonction.

Thank you!

Hope it’s clear.

Maxime

A bit late. I’ll mention just one way, which is perhaps not ideal for every situation, but its succinct. Bubble has a server-side function called get_object_from_id( ) and get_objects_from_ids( ), which will take a 32-digit UID (or array of UIDs) and return JS object(s).

If you check out the post below, you can see that mishav’s toolbox plugin has some documentation and an example app where this is done and then returns JSON. You could also use a plugin that converts things to JSON and one workflow step and then convert the JSON to an object in your plugin/script