RosettaCodeData/Task/Conditional-structures/Jq/conditional-structures-4.jq
2017-09-25 22:28:19 +02:00

7 lines
177 B
Text

exp
| if . == true then "true"
elif . == false then "false"
elif . == null then "maybe"
elif type == "string" then .
else error("unexpected value: \(.)")
end