Closed podhmo closed 6 years ago
$ dictknife mkdict --name foo --age 20 --name bar
{
"name": "bar",
"age": 20
}
$ dictknife mkdict --name foo --age 20 ";" --name bar
[
{
"name": "foo",
"age": 20
},
{
"name": "bar"
}
]
$ dictknife mkdict --squash --name foo --age 20 ";" --name bar
{
"name": "foo",
"age": 20
}
{
"name": "bar"
}
dictknife mkdict @ob/name foo @ob/age 40 name bar age 20 parent "&ob" ";" name boo age 18 parent "&ob" | tee output/09.json
[
{
"name": "bar",
"age": 20,
"parent": {
"name": "foo",
"age": 40
}
},
{
"name": "boo",
"age": 18,
"parent": {
"name": "foo",
"age": 40
}
}
]
$ dictknife mkdict @xs//name a @xs/-1/age 20 @xs/1/name b @xs/1/age 10 names/ "&xs/0/name" names/ "&xs/1/name"
{
"names": [
"a",
"b"
]
}