...
Code Block |
---|
{ "Descriptive": { "Title": "#{R('Descriptive.Title').toUpperCase()}", "Description": "#{R('Descriptive.Title') + ': ' + R('Dynamic.CustomDescription')}", "Keywords": {"Keyword": "#{{R('Dynamic.CustomTag')}}"} }, "Dynamic": { "Orientation": "#{R('Technical.Width') > R('Technical.Height') ? 'Horizontal' : 'Vertical'}", "AdditionalInformation": "My custom field" } } |
...
Output after evaluating the expression | Conversion into JSON |
---|---|
| JSON string |
| JSON boolean |
| JSON number |
| JSON array |
| JSON object |
| JSON object containing JSON arrays |
Notice how the string "#{{R('Dynamic.CustomTag')}}"
is evaluated into an array ["My custom tag"]
. The end result is a valid metadata sidecar for “Keywords” namely "Keywords": {"Keyword": ["My custom tag"]}
whereas before evaluating the expression "Keywords": {"Keyword": "#{...}"}
is not a strictly valid metadata sidecar because the value of "Keyword"
must be an array and not a string.
...