geofffranks / spruce

A BOSH template merge tool
MIT License
426 stars 77 forks source link

Error when top level object is an array #360

Open ywei2017 opened 2 years ago

ywei2017 commented 2 years ago
echo '[ {"key1": "value1"}, {"key2": "value2"}]' | jq .
[
  {
    "key1": "value1"
  },
  {
    "key2": "value2"
  }
]

echo '[ {"key1": "value1"}, {"key2": "value2"}]' | jq . | spruce merge
STDIN: Root of YAML document is not a hash/map: type assertion to map[interface]interface{} failed

Is this normal? Or, how can I parse top level arrays?

Thanks