Update index.js

Added functionality to allow an array root wrapped in a differently named root element.
eg.
{"Dogs":[{"name":"spot"},{"name":"rover"}}
<Kennel>
<dog>
  <name>spot</name>
</dog>
<dog>
  <name>rover</name>
</dog>
<Kennel>