Services Plugins FAQs

JSON Toolkit array conversion issue

Hello. I am testing the JSON Toolkit plugin. My primary use is to convert a bubble object that is pulled via an API call to an external db. For the most part the plugin has worked well. The one issue encountered was converting an array column. The expected JSON structure is below. In this example the static_sport_id_list field is ignored and not converted. Can you please look into this issue? It would be greatly appreciated. Thank you. Naveen

{
“id”: 1,
“label”: “”,
“static_sport_id_list”: [1],
“static_governingbody_id”: 1,
“sortorder”: 1,
“isvisible”: true
}

Hi @naveenreddyla ,

Thank you for reaching out!

I’ve checked the plugin on my end, and it’s working as expected, just like on the Live Demo Page. Could you please provide a bit more information about your specific case:

  • The version of the plugin you’re using
  • The browser you’re working with
  • A screenshot of your element tree and workflow setup
  • If possible, a Loom video showing the issue

This will help us troubleshoot the issue more effectively.

Looking forward to your response!

Best regards,
Mina

Hi @naveenreddyla,

I just wanted to check in on my previous message. Were you able to gather the details I mentioned? These details will help us troubleshoot more effectively.

If the issue has been resolved on your end, please feel free to let us know too!

Looking forward to hearing from you!

Best regards,
Mina

Hi Mina,

I apologize for the delayed response. I will send you an example of the tomorrow when I get a chance to replicate the issue.

I appreciate your patience.

Naveen

Hi @naveenreddyla ,

Thank you for your reply, looking forward to the example when you get a chance to replicate the issue. I appreciate you taking the time to follow up. :pray:

Best regards,
Mina

Hi Mina,

The easiest way to explain the problem is to provide the expected JSON output vs. the actual output from the plugin. In the example below the expected JSON has a key value pair “static_sport_id_list”: [6,7]. This is an array value. Below, I have the actual output from the plugin, which the bolded output represents the same JSON output. As you can see, there is no key/value pair for static_sport_id_list. The same holds true for all the output. It seems that the plugin is not processing arrays.

Let me know if you need any other information.

Thanks,

Naveen

{
“id”: 16,
“label”: “US Volleyball”,
“url_logo”: “https://qsebxwtzwcaezjgbvbgs.supabase.co/storage/v1/object/public/logos/USVolleyball7jSqIgNF4s”,
"static_sport_id_list": [6,7],
“isvisible”: true,
}

[{"_api_c2_id":8,"_api_c2_label":“AAU”,"_api_c2_url_logo":“https://qsebxwtzwcaezjgbvbgs.supabase.co/storage/v1/object/public/logos/AAUCNZ4iVHf8S","_api_c2_isvisible":true,"body_raw_text”:null},

{"_api_c2_id":16,"_api_c2_label":“US Volleyball”,"_api_c2_url_logo":“https://qsebxwtzwcaezjgbvbgs.supabase.co/storage/v1/object/public/logos/USVolleyball7jSqIgNF4s","_api_c2_isvisible":true,"body_raw_text”:null},

{"_api_c2_id":5,"_api_c2_label":“AYSO”,"_api_c2_url_logo":“https://qsebxwtzwcaezjgbvbgs.supabase.co/storage/v1/object/public/logos/AYSOB4k5pgLF8m","_api_c2_isvisible":true,"body_raw_text”:null},

{"_api_c2_id":15,"_api_c2_label":“Little League”,"_api_c2_url_logo":“https://qsebxwtzwcaezjgbvbgs.supabase.co/storage/v1/object/public/logos/LittleLeague9YYuLUslnP","_api_c2_isvisible":true,"body_raw_text”:null},

{"_api_c2_id":7,"_api_c2_label":“NFL Flag”,"_api_c2_url_logo":“https://qsebxwtzwcaezjgbvbgs.supabase.co/storage/v1/object/public/logos/nflflagkLXfvsE5hv","_api_c2_isvisible":true,"body_raw_text”:null},

{"_api_c2_id":10,"_api_c2_label":“National Youth Cricket League”,"_api_c2_url_logo":null,"_api_c2_isvisible":true,“body_raw_text”:null},{"_api_c2_id":2,"_api_c2_label":“PONY”,"_api_c2_url_logo":“https://qsebxwtzwcaezjgbvbgs.supabase.co/storage/v1/object/public/logos/PONYT8piMjwuOI","_api_c2_isvisible":true,"body_raw_text”:null},

{"_api_c2_id":9,"_api_c2_label":“US Dodgeball”,"_api_c2_url_logo":“https://qsebxwtzwcaezjgbvbgs.supabase.co/storage/v1/object/public/logos/USDodgeballlHCbsnO07K","_api_c2_isvisible":true,"body_raw_text”:null,

{"_api_c2_id":14,"_api_c2_label":“US Field Hockey”,"_api_c2_url_logo":“https://qsebxwtzwcaezjgbvbgs.supabase.co/storage/v1/object/public/logos/USFieldHockeyE0FkOUKoAt","_api_c2_isvisible":true,"body_raw_text”:null},

{"_api_c2_id":12,"_api_c2_label":“US Flag”,"_api_c2_url_logo":“https://qsebxwtzwcaezjgbvbgs.supabase.co/storage/v1/object/public/logos/USFlagoMCt3FMyos","_api_c2_isvisible":true,"body_raw_text”:null},

{"_api_c2_id":6,"_api_c2_label":“US Football”,"_api_c2_url_logo":“https://qsebxwtzwcaezjgbvbgs.supabase.co/storage/v1/object/public/logos/USFootballMttin331nL","_api_c2_isvisible":true,"body_raw_text”:null},

{"_api_c2_id":13,"_api_c2_label":“US Hockey”,"_api_c2_url_logo":“https://qsebxwtzwcaezjgbvbgs.supabase.co/storage/v1/object/public/logos/USHockeyCpyTPdQbEd","_api_c2_isvisible":true,"body_raw_text”:null},

{"_api_c2_id":17,"_api_c2_label":“US Lacrosse”,"_api_c2_url_logo":“https://qsebxwtzwcaezjgbvbgs.supabase.co/storage/v1/object/public/logos/USLacrosseCYMIKZokM5","_api_c2_isvisible":true,"body_raw_text”:null},

{"_api_c2_id":3,"_api_c2_label":“US Softball”,"_api_c2_url_logo":“https://qsebxwtzwcaezjgbvbgs.supabase.co/storage/v1/object/public/logos/USSoftballxNIThwbHQe","_api_c2_isvisible":true,"body_raw_text”:null},

{"_api_c2_id":11,"_api_c2_label":“US Ultimate”,"_api_c2_url_logo":“https://qsebxwtzwcaezjgbvbgs.supabase.co/storage/v1/object/public/logos/USUltimateL3bz6IP6qd","_api_c2_isvisible":true,"body_raw_text”:null},

{"_api_c2_id":4,"_api_c2_label":“USSSA”,"_api_c2_url_logo":“https://qsebxwtzwcaezjgbvbgs.supabase.co/storage/v1/object/public/logos/USSSA6SfaY3MYeq","_api_c2_isvisible":true,"body_raw_text”:null},

{"_api_c2_id":1,"_api_c2_label":“no value”,"_api_c2_url_logo":null,"_api_c2_isvisible":false,“body_raw_text”:null}]

Hi @naveenreddyla ,

Thank you for the detailed explanation.

I was able to test it on my side, and it’s working as expected. I confirmed with the Dev team that the action “get keys from JSON” can only receive text format. So, if your parameter format is set as “array,” you will need to convert it into text first before proceeding with the “get option from API” action.

Could you please share the format of your parameter, along with a screenshot of your setup and the debugger? Alternatively, you can create a Loom video showing the setup. This will help us better understand how things are configured on your end.

Looking forward to your response!

Best regards,
Mina

Hi @naveenreddyla ,

Just following up to see if my previous suggestion helped resolve the issue you were facing with our plugin. Could you kindly confirm whether everything is working fine now, or if you’re still encountering any problems? :pray:

Looking forward to hearing from you soon!

Best regards,
Mina

Hi Mina,

The field that is having the problem is and integer array field coming from Supabase via a plugin. If I set the field (static_sport_id) as a number array data comes in as a number, but as you indicated cannot be handled by the JSON plugin and thus the field is ignored. If for example the array contains the values [1,2], the values are available within Bubble as “1,2” However, no corresponding key for static_sport_id is written


image

If I then set the field to a text array I get a type error in the console from the Supabase and the Get Things as JSON plugin.


If I set the field type to text, the static_sport_id key is written but there are no corresponding value


image

If I set the field type to number, the static_sport_id key is written but there are no corresponding value.


image

I am not sure how else to convert the array to text, as the object comes from an external DB and then published as a Bubble thing based on the data types set in the API connector.

If you have any other thoughts, or think there is something I am missing, please let me know.

Thanks,

Naveen