summaryrefslogtreecommitdiff
path: root/first-def.jq
diff options
context:
space:
mode:
Diffstat (limited to 'first-def.jq')
-rw-r--r--first-def.jq6
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]}))
+)