JSON array, how to iterate through it?

I’m very new to wappler, please excuse if this is a dumb question, I haven’t found anything about this topic though. I’m setting up a website for our company and have gotten quite far actually. I try to avoid using mysql since the website structure is very simple, so I decided using JSON.

I’m using an array in JSON, with each element of the array representing a project. Within this array I have a second array where I save image urls. accessing normal strings within the first array is no problem whatsoever. also repeating children of the image array works. what doesn’t work is iterating through this array. no matter what I do, I don’t seem to be able to access the array with the data iterator.

I also tried to copy the image urls into another array in wappler and then using the iterator, but I couldn’t get this to work either (but maybe I dind’t do this correctly). what would be the correct procedure for this? I basically want to show one or two images at the time while being able to move forward and backwards…

thanks in advance for any pointers.

to clarify, here is the JSON code I’m using:

{
“title” : “FS”,
“text” : “”,
“place” : “Erlenbach, ZH, CH”,
“year” : “2017”,
“type” : “Einfamilienhaus”,
“images” : [
“/images/FS/fs1.jpg”,
“/images/FS/fs2.jpg”,
“/images/FS/fs3.jpg”
]
}

I’m trying to iterate through the images above.

hey, did you find out? TIA

You can use the Repeat step and select the variable you want to iterate - also works for objects inside a variable (e.g.: “images” in the example above)

1 Like