diff --git a/README.md b/README.md index 84fe347..3f40ae9 100644 --- a/README.md +++ b/README.md @@ -16,7 +16,7 @@ Or worse, where you had to count spaces in yaml? Fear no more, sackmesser will t Operations have a signature like `op_name(path, args*)` where -* path is dot delimited, you could use quotes in case field names contain spaces, dots, commas, etc: +* path is dot delimited, you could use quotes in case field names contain spaces, dots, commas, etc. For array access you can use array notation: ``` echo '{ "a" : { "test prop": 1 } }' | sackmesser mod 'set(a."test prop", "test")' @@ -27,6 +27,16 @@ Operations have a signature like `op_name(path, args*)` where } ``` + ``` + echo '{ "a" : { "test prop": [ 1 , true ] } }' | sackmesser mod 'set(a."test prop"[1], "test")' + "a": { + "test prop": [ + 1, + "test" + ] + } + ``` + * Zero or more arguments are required for an operation. An argument could be one of - a number - `null`