TypebotT
Typebot•2y ago
chrisokoth

Parsing REST API results and printing the results in a loop

I'm creating a typebot that gets search results via rest API. I have tried formatting the result but instead of displaying all the results I only get 1 result. I'm using the WordPress search API. I'm assigning the result to a variable called search_result. Is it possible to display an image in the results loop? Anyone please help 🥹.

{
"statusCode": 200,
"data": [
{
"id": 19527,
"title": "Kibuye Market",
"url": "https://testsite.com/map/kibuye-market/",
"type": "post",
"subtype": "map",
"_links": {
"self": [
{
"embeddable": true,
"href": "https://testsite.com/wp-json/wp/v2/map/19527"
}
],
"about": [
{
"href": "https://testsite.com/wp-json/wp/v2/types/map"
}
],
"collection": [
{
"href": "https://testsite.com/wp-json/wp/v2/search"
}
]
}
},
{
"id": 19526,
"title": "Kisumu Museum and Snake Park",
"url": "https://testsite.com/map/kisumu-museum-and-snake-park/",
"type": "post",
"subtype": "map",
"_links": {
"self": [
{
"embeddable": true,
"href": "https://testsite.com/wp-json/wp/v2/map/19526"
}
],
"about": [
{
"href": "https://testsite.com/wp-json/wp/v2/types/map"
}
],
"collection": [
{
"href": "https://testsite.com/wp-json/wp/v2/search"
}
]
}
}
Screenshot_2024-05-14_152842.png
Was this page helpful?