Hi, I have a recipe table in dynamodb whose data is like below (bottom getRecipes response):
I have one table where it shows recipe names and the other table we have ingredient list. I want to populate the ingredient table on clicking the recipe row.
I tried creating transformer like this:
const items = {{ getRecipes.data.Items }}
return (items.filter(row => row.INGREDIENTS < {{ table1.selectedRowKey}}))
and gave this transformer as source of table2 but that didnt help, Can someone guide; i am new to retool
Response of getRecipes:
{
"$metadata": {
"httpStatusCode": 200,
"requestId": "K327U2QLR7RF5MSAM86G3D36TRVV4KQNSO5AEMVJF66Q9ASUAAJG",
"attempts": 1,
"totalRetryDelay": 0
},
"Count": 2,
"Items": [
{
"INGREDIENTS": {
"L": [
{
"M": {
"name": {
"S": "All purpose flour"
},
"unit": {
"S": "lb"
},
"quantity": {
"S": "0.33"
}
}
},
{
"M": {
"name": {
"S": "Pista"
},
"unit": {
"S": "oz"
},
"quantity": {
"S": "1.06"
}
}
},
{
"M": {
"name": {
"S": "Sugar"
},
"unit": {
"S": "lb"
},
"quantity": {
"S": "0.1"
}
}
}
]
},
"CATEGORY": {
"S": "CBY"
},
"RECIPE_NAME": {
"S": "TEMP2324"
}
},
{
"INGREDIENTS": {
"L": [
{
"M": {
"name": {
"S": "All purpose flour"
},
"unit": {
"S": "lb"
},
"quantity": {
"S": "0.4"
}
}
},
{
"M": {
"name": {
"S": "Milk powder"
},
"unit": {
"S": "oz"
},
"quantity": {
"S": "1.41"
}
}
},
{
"M": {
"name": {
"S": "Oil"
},
"unit": {
"S": "gal"
},
"quantity": {
"S": "0.03"
}
}
},
{
"M": {
"name": {
"S": "Sugar"
},
"unit": {
"S": "lb"
},
"quantity": {
"S": "0.31"
}
}
},
{
"M": {
"name": {
"S": "Vinagar"
},
"unit": {
"S": "lt"
},
"quantity": {
"S": "0.0075"
}
}
},
{
"M": {
"name": {
"S": "Almond"
},
"unit": {
"S": "oz"
},
"quantity": {
"S": "0.35"
}
}
}
]
},
"CATEGORY": {
"S": "CBY"
},
"RECIPE_NAME": {
"S": "Temp recipe"
}
}
],
"ScannedCount": 2
}