On Sunday, 1 November 2020 at 13:31:19 UTC, Anonymouse wrote:
On Sunday, 1 November 2020 at 09:14:35 UTC, Vino wrote:
[...]
I can only test with Phobos (no asdf on run.dlang.io), but
isn't just normal sort and uniq what you want?
data[]
.array
.sort
.uniq!((tup1, tup2) => tup1[0
On Sunday, 1 November 2020 at 09:14:35 UTC, Vino wrote:
[
Tuple!(string, string)("DEV", "D1"),
Tuple!(string, string)("DEV", "default"),
Tuple!(string, string)("DEV", "D1"),
Tuple!(string, string)("QAS", "Q1"),
Tuple!(string, string)("QAS", "Q1"),
Tuple!(string, string)("QAS", "default"),
Hi All,
Request your help on how to remove duplicates in JSON.
Code:
import asdf;
import std.algorithm : map, filter, uniq;
import std.container.array;
import std.stdio : writeln;
import std.typecons : Tuple, tuple;
import std.array;
void main() {
string apidata = `{
"items":
[
{ "name