nushell/tests/fixtures/formats/nested_uniq.json
Ryan Blecher f37f29b441 Add uniq command (#1132)
* 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
2019-12-31 17:05:02 +13:00

73 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" }
}
}
]