-
Notifications
You must be signed in to change notification settings - Fork 19
Open
Labels
Description
Great package!
I have an issue with handling arrays. I'm using untranspose to convert into a mongodb modifier.
Input data looks like this:
{
tracking: true,
blocked: true,
nsfw: false,
categories: {
subscribed: [ 'xag2vJYrDJdsyZfah', 'abpxCb6pN3aR4piMw' ],
blocked: []
},
sources: {
subscribed: [ '4QSh8AqECuPauHFor' ],
blocked: []
}
}
Output data looks like this:
{
'tracking': true,
'blocked': true,
'nsfw': false,
'categories.subscribed[0]': 'xag2vJYrDJdsyZfah',
'sources.subscribed[0]': '4QSh8AqECuPauHFor'
}
I was expecting/would prefer this:
{
'tracking': true,
'blocked': true,
'nsfw': false,
'categories.subscribed': ['xag2vJYrDJdsyZfah', 'abpxCb6pN3aR4piMw'],
'sources.subscribed': ['4QSh8AqECuPauHFor']
}
Could we include an optional flag to not break down arrays? Also, it seems a little buggy in its current format because it only included the first array element not the second.