Forum Academy Marketplace Showcase Pricing Features

Creating an array of objects in custom state

Hi,
I need help in creating an array of objects in custom state. Actually, I am are creating a marketplace using our own backend, so there has been a situation in which I cannot figure out a way to store an array of objects coming from an external api to a custom state and later use that state to fill information in the repeating group.

-Gurshan

Did you, at least, managed to get your data from your API?

Hey,

see this example. I use the coin gecko API here. I set the state with the data from the external API and store. I can then work with it in any way I want. Maybe this makes sense to your case.

image

Many greetings.

Sarah

1 Like

Hi @rpetribu,

I was able to get data in Bubble. However, we cannot save an array of objects in a single custom state.

I was trying to use packet info’ quantity as list within in RG.

You can’t save the objects in a list…
Generally you just need a couple information… not all the object.
What information do you need to extract??

I want to extract both values stored in stock quantity; both amount and unit, I want to dynamically manage pkt size and its price.

Thanks Sarah!

In my case I have products where I need to dynamically change price and associated weight of each product and show them in repeating groups.