File tree Expand file tree Collapse file tree 2 files changed +23
-2
lines changed Expand file tree Collapse file tree 2 files changed +23
-2
lines changed Original file line number Diff line number Diff line change @@ -22,7 +22,8 @@ Options:
2222Commands:
2323 merge <file> <files> merge two or more json files into one
2424 set <file> <key> <value> set a value in a json file
25- remove <file> <key> Remove a value from the json
25+ remove, rm <file> <key> Remove a value from the json
26+ get <file> <key> Read a value from a JSON file.
2627```
2728
2829### Commands
@@ -87,3 +88,23 @@ Options:
8788 -o, --output <file> The output file (use '-' for STDOUT, defaults to <file>)
8889 -?, -h, --help Show help and usage information
8990```
91+
92+ #### get
93+
94+ Reads the json file and returns the value for the given key.
95+
96+ ```
97+ get:
98+ Read a value from a JSON file.
99+
100+ Usage:
101+ dotnet-json get [options] <file> <key>
102+
103+ Arguments:
104+ <file> The JSON file (use '-' for STDIN)
105+ <key> The key to get (use ':' to get a nested object and use index numbers to get array values eg. nested:key or nested:1:key)
106+
107+ Options:
108+ -e, --exact only return exact value matches, this will return an error for references to nested objects/arrays.
109+ -?, -h, --help Show help and usage information
110+ ```
Original file line number Diff line number Diff line change 1313 <ToolCommandName >dotnet-json</ToolCommandName >
1414 <PackageOutputPath >./nupkg</PackageOutputPath >
1515
16- <Version >0.3 .0</Version >
16+ <Version >0.4 .0</Version >
1717 <PackageId >dotnet-json</PackageId >
1818 <Authors >sleeuwen</Authors >
1919 <RepositoryUrl >https://github.com/sleeuwen/dotnet-json</RepositoryUrl >
You can’t perform that action at this time.
0 commit comments