25 lines
410 B
Bash
Executable File
25 lines
410 B
Bash
Executable File
#!/bin/sh
|
|
|
|
jq '[
|
|
JOIN(
|
|
INDEX(
|
|
.[] | select(
|
|
.model == "app.helper"
|
|
);
|
|
.pk | tostring
|
|
);
|
|
.[] | select(
|
|
.model == "feedback.feedback"
|
|
and .fields.next_year
|
|
);
|
|
.pk | tostring;
|
|
.[0].fields as $feedback
|
|
| .[1].fields as $helper
|
|
| {
|
|
"name": $helper.name,
|
|
"next_year": $feedback.next_year,
|
|
"phone": $helper.phone,
|
|
}
|
|
)
|
|
]'
|