RosettaCodeData/Task/Conditional-structures/Jq/conditional-structures-4.jq

8 lines
177 B
Text
Raw Permalink Normal View History

2016-12-05 23:44:36 +01:00
exp
| if . == true then "true"
elif . == false then "false"
elif . == null then "maybe"
elif type == "string" then .
else error("unexpected value: \(.)")
end