Create a variable with specific values received from an external api call

Options

Hi,

I am getting the following response from Meta catalog, describing a list of products. The response per product looks like something like this:

{
"data": [
{
"name": "Shoe",
"retailer_id": "123gffj",
"availability": "in stock",
"description": "Test description.",
"color": "Red",
"material": "Cotton",
"pattern": "Stripes",
"sale_price": "$ 32,000",
"currency": "COP",
"gender": "unisex",
"age_group": "adult",
"id": "6026848224036348"
}


For each product, I have to create a variable with only the name, description and color of the product. For this sample would look like this:

Name: Shoe, Description: Test description., Color: Red


This is what I'm trying:



Now I have no clue on what to do here to create the "Name: Shoe, Description: Test description., Color: Red" variable:



Any help would be appreciated, thanks!

Tagged:

Best Answer

  • Ray Deck
    Ray Deck Trusted Xano Expert ✭✭✭
    Answer ✓
    Options

    Use the stop and debug function in xano inside your for-each loom to see what variant contains. That will help you make smart decisions about how to extract the data you want. When you see a member (e.g. variant contains a path called "name", you can set variable name to value variant.name

    This dot syntax (akin but not exactly like JSON Path) lets you move a lot faster in xano.

Answers