Hello,
I’d like to know how to format a Client Javascript returned object to bubble to make sure it matches the same structure as a “Type” in the bubble database.
for example, I have a type of “Myobject” with the following fields :
- item1 as text
- item2 as text
- item3 as text.
In my Client Javascript I run an Http request and some code that gives one single value for each “item”, like :
- item1=“this is my value for item1”;
- item2=“this is my value for item”;
- item3=“this is my value for item3”;
when I try to link my Client Javascript code to bubble by finishing my code with bubble_fn_mydata(item1:item1,item2:item2,item3:item3) data will not show up, even if I’ve checked that the “javascript to bubble” component has the correct format of MyObject.
I have also tried to create the MyObject forst, and then send it back, like the below :
MyObject={item1:item1,item2:item2,item3,item3}
and then send it back to bubble with :
bubble_fn_mydata(MyObject);
None of these solution work. No error message, but no data is transfered to bubble so that I can display them into Text components.
Console.log(MyObject) gives :
{item1:“this is my value for item1”, item2:“this is my value for item2”,item3:“this is my value for item3”}
Which seems ok to me, but I might be wrong somewhere ?
Thansk for some guidance on how to format this CLient Javascript code so that Bubble can capture it properly.
Thanks,
Laurent.