floor
Last updated
Returns the largest integer less than or equal to the input. If the input is already an integer, it is returned as-is.
floor(value)or chained:
<number>.floor()value (int | float, optional when chained) - The number to floor.
Round down a positive float
floor(3.7)
// 3Negative values round toward negative infinity
floor(-2.3)
// -3Integer input unchanged
floor(5)
// 5CLI usage
Last updated
$ echo '{"price": 9.99}' | dasel -i json 'floor(price)'
9