mirror of
https://github.com/nushell/nushell
synced 2024-12-27 13:33:16 +00:00
f37f29b441
* start playing with ways to use the uniq command * WIP * Got uniq working, but still need to figure out args issue and add tests * Add some tests for uniq * fmt * remove commented out code * Add documentation and some additional tests showing uniq values and rows. Also removed args TODO * add changes that didn't get committed * whoops, I didn't save the docs correctly... * fmt * Add a test for uniq with nested json * Add another test * Fix unique-ness when json keys are out of order and make the test json more complicated
72 lines
1.1 KiB
JSON
72 lines
1.1 KiB
JSON
[
|
|
{
|
|
"name": "this is duplicated",
|
|
"nesting": [
|
|
{
|
|
"a": "a",
|
|
"b": "b"
|
|
},
|
|
{
|
|
"c": "c",
|
|
"d": "d"
|
|
}
|
|
],
|
|
"can_be_ordered_differently": {
|
|
"array": [1, 2, 3, 4, 5],
|
|
"something": { "else": "works" }
|
|
}
|
|
},
|
|
{
|
|
"can_be_ordered_differently": {
|
|
"something": { "else": "works" },
|
|
"array": [1, 2, 3, 4, 5]
|
|
},
|
|
"nesting": [
|
|
{
|
|
"b": "b",
|
|
"a": "a"
|
|
},
|
|
{
|
|
"d": "d",
|
|
"c": "c"
|
|
}
|
|
],
|
|
"name": "this is duplicated"
|
|
},
|
|
{
|
|
"name": "this is unique",
|
|
"nesting": [
|
|
{
|
|
"a": "b",
|
|
"b": "a"
|
|
},
|
|
{
|
|
"c": "d",
|
|
"d": "c"
|
|
}
|
|
],
|
|
"can_be_ordered_differently": {
|
|
"array": [],
|
|
"something": { "else": "does not work" }
|
|
}
|
|
},
|
|
{
|
|
"name": "this is unique",
|
|
"nesting": [
|
|
{
|
|
"a": "a",
|
|
"b": "b",
|
|
"c": "c"
|
|
},
|
|
{
|
|
"d": "d",
|
|
"e": "e",
|
|
"f": "f"
|
|
}
|
|
],
|
|
"can_be_ordered_differently": {
|
|
"array": [],
|
|
"something": { "else": "works" }
|
|
}
|
|
}
|
|
]
|