Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ryankirkman/find_dupes
find duplicate values in an array in a JSON input file
https://github.com/ryankirkman/find_dupes
Last synced: 7 days ago
JSON representation
find duplicate values in an array in a JSON input file
- Host: GitHub
- URL: https://github.com/ryankirkman/find_dupes
- Owner: ryankirkman
- License: mit
- Created: 2015-09-25T00:34:58.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2015-09-25T01:07:41.000Z (over 9 years ago)
- Last Synced: 2024-12-08T12:13:08.010Z (28 days ago)
- Language: JavaScript
- Size: 145 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
find_dupes
==========Find duplicates in an input JSON file.
Install (as a command line util)
================================
`npm install find_dupes -g`Usage
=====
NB: The input file will be assigned to a variable called `json` for use in the `--array` command line argument.`--array`: Where we can find the array. Remember the JSON input is assigned to a variable called `json`, so if the input file contained an array, we could simply specify `--array=json`
`--id`: A key that is looked up for each element in the array to find a value that uniquely identifies an element in the array. Assumes each element of the array is an object.
## Usage Example
### Simple
`find_dupes input.json --array=json --id=id`### Advanced
`find_dupes input.json --array=json.content.result --id=product.meta.id`