[object Object] instead of a json string

Hey Bubblers!

Haven’t found an answer on the forum so hopefully someone encountered this issue :slight_smile:

I have a backend workflow that return some data and among the data there is a field called “form_variable_fields” that should be a json string. But instead I get an [object Object].

I’ve tried the following:

  • json.stringify

  • console.log

  • read the key value with a JSON plugin

But in the end it always display a [object Object]. Any idea how I can solve this? Thanks for your help!

Hey @NigelG , glad to see you here!

form_variable_fields come from an SQL query using SQL Database connector and is a complex JSON (see pictures).

I created an API call in Bubble so that I can return data from API and get the data from my SQL query (see below).

The return value for from_variable_fields is of type text. So I thought it would give it to me as a json string but it’s just [object Object] (see below).

It seems like Bubble can’t interpret the json, I don’t really know.

I will try to create an API Route in NextJs and stringify the value before returning the value.

If you have more ideas, I’d be happy to hear :slight_smile:

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