To create an index (or UniqueIndex) on a LokiJS collection you just need to specify the field name:
db.addCollection('Children',{indices:['name']})
...will create an index on 'name' property of documents in the collection.
That's ok for simple documents. But what if your doc has nested objects? ie.:
{
propA: 123,
propB: 'abc',
propC: {
propC1: 789,
propC2: 'xyz'
}
}
Is there a way to specify an index on propC1?