Dasel
v3
v3
  • Getting started
    • Introduction
    • Installation
    • Concepts
      • Expressions
      • Branches
  • Syntax
    • Whitespace
    • Types/Literals
    • String concatenation
    • Arrays/slices
    • Objects/maps
    • Conditionals
    • Spread
    • Coalesce
  • Input/Output
    • Read/Write formats
    • Stdin
    • Stdout
    • Variables
    • Read/Writer flags
  • Functions
    • add
    • min
    • max
    • reverse
    • toString
    • toInt
    • toFloat
    • typeOf
    • map
    • filter
    • sortBy
    • parse
    • base64e
    • base64d
Powered by GitBook
On this page
  1. Syntax

Conditionals

Dasel currently supports if/elseif/else. E.g.

if (x == "foo") {
    1
} elseif (y == "bar") {
    2 
} else {
    3
}

It's important to note that a conditional statement must result in a value.

PreviousObjects/mapsNextSpread

Last updated 7 months ago