-
Notifications
You must be signed in to change notification settings - Fork 24
Open
Description
Hey guys,
I have a model with nested objects, ie.
collection = {
key1: 'string',
key2: {
name: 'name'
}
}
I would like to display collection.key2.name
on the search view
http://mongorilla.herokuapp.com/search/instrument
however I noticed this line gets rid of nested objects
https://github.com/gerardobort/mongorilla/blob/master/routes/api/generic.js#L218
I did a fix replacing that line by:
data[i] = collection.fastSearch.columns.reduce((item, key) => {
item[key] = eval(`result.${key}`)
return item
}, {})
Just wanted to check if there were a better way to do this, I just found out this package, seams really cool, but I'm not yet really familiar with.
Thanks,
Cheers.
PD. Nice repo!
Metadata
Metadata
Assignees
Labels
No labels