-
Is it possible to merge arrays using values as keys?
We can merge arrays using their indices as keys:
But is there a way to merge arrays using their values as keys in order to remove duplicate values?
|
Beta Was this translation helpful? Give feedback.
Answered by
mikefarah
Apr 29, 2021
Replies: 1 comment 4 replies
-
You should be able to do it - I've recently added an example of merging arrays using matching object keys: |
Beta Was this translation helpful? Give feedback.
4 replies
Answer selected by
kyguy
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You should be able to do it - I've recently added an example of merging arrays using matching object keys:
https://mikefarah.gitbook.io/yq/operators/multiply-merge#merge-arrays-of-objects-together-matching-on-a-key