Update index.js

If subdoc is missing _id path but id is present. Create _id and then return