Data structure
#itemContent
Get the value of the content attribute from an ite with a specific key
Usage:
We have this input data:
{
"items": [
{
"key": "text1",
"content": "Hello World"
},
{
"key": "text2",
"content": "Second Value"
}
]
}
Template:
Result:
Hello World
Fallback example
Template:
Result:
NOT FOUND
If no fallback provided. The result will be empty string ""
Using Custom Property Names
By default helper expect
| Property | Default |
|---|---|
| key field | key |
| value field | content |
But you can customize both.
Data input:
{
"attributes": [
{
"name": "color",
"value": "red"
},
{
"name": "size",
"value": "XL"
}
]
}
Template:
Result:
red