Quantcast
Channel: Active questions tagged jq - Stack Overflow
Viewing all articles
Browse latest Browse all 657

Remove duplicates from JSON arrays

$
0
0

I want to remove the duplicates from each array in this JSON:

{"abc": ["five"  ],"pqr": ["one","one","two","two","three","three","four","four"  ],"xyz": ["one","one","two","two","four"  ]}

Output I am expecting after removing the duplicates:

{"abc": ["five"  ],"pqr": ["one","two","three","four"  ],"xyz": ["one","two","four"  ]}

I tried map, uniq, group_by with jq but nothing helped


Viewing all articles
Browse latest Browse all 657

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>