Javascript server side script to use in RG

@mishav I’m trying to use your Toolbox to get a list of venue names and use it in a RG in Bubble from a nested JSON object (REST API Response).

The following JS code maps the values of key names into an array resultwhich I am currently using to set the state of a custom variable in a RG.

The issue is that is that the result of the script is null all the time, are you able to please assist?

Server Script Toolbox action

JSON nested object

  "barID1": {
    "address": "4 East Terrace, Sydney NSW 2000",
    "appStoreURL": "",
    "description": “description text”,
    "imgURLs": [ "Https:url1”,  "https:url2”, "https:url3” ],
    "lat": -34.810585,
    "lon": 138.616739,
    "name": "Africola",
    "phone": "(08) 8223 3885",
    "status": "active",
    "venueImgURL": "https:url”
  "barID2": {
    "address": "138/140 Gouger St, Sydney NSW 2000",
    "appStoreURL": "",
     "description": “description text”,
    "imgURLs": [ "Https:url1”,  "https:url2”, "https:url3” ],
    "lat": -34.848082,
    "lon": 138.599813,
    "name": "Disco Mexico Taqueria",
    "phone": "0416 855 108",
    "status": "active",
    "venueImgURL": "https:url”

Run mode

Value empty

Hi @Rogelio, did you manage to solve this? I am also interested in a solution for this.

I did, using the Run javascript action instead and the javascript-to-bubble design element which specifies the expected value (list in this case) which you can then use as the data source in your RG.

Thanks. And have you been able to pass an array of arrays?

I have nested JSON and I am looking for a way to pass it to Bubble and store it in a thing.

I have a data type as follows:

Field 1: Text
Field 2: Thing (List of texts)

I want to match the nested JSON with this data type.

Haven’t been able so far.

Hey Jon,

Did you manage to solve this?

Keen to know if there is a solution in principle…


Hey Jon, were you able to solve this? I’m stuck in the same spot as you and I’d really love for someone to share their solution to it.