Update mapping-generator.js

Fix to enable indexing of nested objects