round
Last updated
Rounds a number to the nearest integer. If the input is already an integer, it is returned as-is.
round(value)or chained:
<number>.round()value (int | float, optional when chained) - The number to round.
Round up
round(3.5)
// 4Round down
round(3.4)
// 3Negative values
round(-2.5)
// -2CLI usage
Last updated
$ echo '{"score": 7.6}' | dasel -i json 'round(score)'
8