Skip to content

Commit ed1dacf

Browse files
authored
(docs) Add an example for ternary conditional (#548)
* Add ternary example * Remove extra whitespace
1 parent 477d6d9 commit ed1dacf

File tree

1 file changed

+19
-1
lines changed

1 file changed

+19
-1
lines changed

docs/programming.md

+19-1
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,25 @@ The expression `predicate` is evaluated. If its effective boolean value (see de
4848

4949
__Examples__
5050

51-
TBD
51+
<div class="jsonata-ex">
52+
<div>Account.Order.Product.{
53+
`Product Name`: $.Price > 100 ? "Premium" : "Basic"
54+
}</div>
55+
<div>[
56+
{
57+
"Bowler Hat": "Basic"
58+
},
59+
{
60+
"Trilby hat": "Basic"
61+
},
62+
{
63+
"Bowler Hat": "Basic"
64+
},
65+
{
66+
"Cloak": "Premium"
67+
}
68+
]</div>
69+
</div>
5270

5371
## Variables
5472

0 commit comments

Comments
 (0)