Array into bubble list

Hey guys, been trying for ages to get this somwhat simple array from a JS function into bubble.

I’ve tried Json.parse and stringify but Javascript to Bubble element always comes back empty (no errors).

Even when I build and array with just a simple array of strings, I get the same result trying to output as a text list… :frowning:

Any ideas please?

I’d guess it has to do with your configuration of the Javascript to Bubble element and/or the function call. Are you able to show those two?

We help founders bridge the gap between their current bubble app and their MVP. Learn more at

Are you using a plug-in builder? It’s pretty simple to turn a list of strings or an array into a bubble thing to use

I did this earlier for my own use case. I could help you out! For free. Please post your question or the code you’re using above!

Thank you guys (and sorry for the delay in responding).

So what I’m actually trying to do is to create a simple way to allow users to switch video or audio devices (since I’m using the Twilio API to create an audio chat room). I am using the Toolbox plugin’s Javascript to bubble element. At first all I’m trying to do is to get a list of devices, which I do with the code pasted below. Unfortunately no matter what I do, I always get blank results on the JStoBubble element (console does show the JS script is fetching the devices correctly).

Here is my code:


I am not, but its actually a great idea! Thanks!

Could I bother you for some pointers on how to do that? :grimacing:


To start. There are big differences between a simple JavaScript array and a Json object array. Which is it?

Also, how would you expect your data returned? In a bunch of list/arrays or as an array or objects?

Thanks! So the code results in an array of objects (mediaDevices). Ideally accessing those objects would be most helpfull since I’d have the deviceID needed to switch devices as well as the type and label of each to present to the user.

Since I couldn’t work that out, I was trying to convert it to a JSON or even just a simple arrays of strings (ie. trying to get deviceIds), but no go for me… :frowning:

if you can share the full code or the editor you are using with me that would help. not sure otherwsise.

Orr can you share the array.

Also, check out this thread and try it out

But mostly this one

1 Like

Sure no problem. I’m not home right now, but will share once I am ok? Thank you again.

1 Like

This topic was automatically closed after 70 days. New replies are no longer allowed.