Skip to content

Commit

Permalink
(docs) Add an example for ternary conditional (#548)
Browse files Browse the repository at this point in the history
* Add ternary example

* Remove extra whitespace
  • Loading branch information
cadam11 authored Nov 1, 2021
1 parent 477d6d9 commit ed1dacf
Showing 1 changed file with 19 additions and 1 deletion.
20 changes: 19 additions & 1 deletion docs/programming.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,25 @@ The expression `predicate` is evaluated. If its effective boolean value (see de

__Examples__

TBD
<div class="jsonata-ex">
<div>Account.Order.Product.{
`Product Name`: $.Price > 100 ? "Premium" : "Basic"
}</div>
<div>[
{
"Bowler Hat": "Basic"
},
{
"Trilby hat": "Basic"
},
{
"Bowler Hat": "Basic"
},
{
"Cloak": "Premium"
}
]</div>
</div>

## Variables

Expand Down

0 comments on commit ed1dacf

Please sign in to comment.