diff options
author | Tom Smeding <tom.smeding@gmail.com> | 2020-03-22 09:00:06 +0100 |
---|---|---|
committer | Tom Smeding <tom.smeding@gmail.com> | 2020-03-22 09:00:06 +0100 |
commit | c07cd773dbedfe8f4a76b43dd9ec37f841d09432 (patch) | |
tree | d30b6c01917a3312c117d7b5e19ee9a4b2f6d59f | |
parent | 841519901e8b6df97733bad85f215a640f6d6d3f (diff) |
-rw-r--r-- | first-def.jq | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/first-def.jq b/first-def.jq new file mode 100644 index 0000000..13bc221 --- /dev/null +++ b/first-def.jq @@ -0,0 +1,6 @@ +.[] | +{romaji: .romaji, text: .alternatives[0].text} + ( + .alternatives[0] | + (select(has("definitions")) | {def: .definitions[0]}), + (select(has("conjugations")) | .conjugations[0] | {form: .form} + (.alternatives[0] | {text, def: .definitions[0]})) +) |