yapm
Version:
package manager for io.js (npm fork)
37 lines (33 loc) • 509 B
YAML
input: |
{
"foo": {
"bar": {
"baz": {
"quux": "4"
}
}
}
}
output: |
{
"foo": {
"bar": {
"baz": {
"quux": "4"
},
"qwe": {
"rty": {
"aaa": {
"bbb": 1
}
}
}
}
}
}
test: !!js/function |
function(jju, input) {
obj = jju.parse(input)
obj.foo.bar.qwe = {rty: {aaa: {bbb: 1}}}
return jju.update(input, obj, {mode:'json'})
}