Skip to content

Custom expression functions

nntrn edited this page Oct 19, 2023 · 1 revision

map groupby

def mgb(expr): map(expr) | group_by(.) | map({key: .[0], value:length}) | sort_by(.value) | reverse;
mgb(.timestamp|fromdate|strflocaltime("%F"))

mgb(select(.GDP_per_capita >20000).Region)
Clone this wiki locally