Reading through some of the other issues, it seems this may be intended behavior. We have enabled the option to output brackets around array indices.
{
items: [
{
123: 'foo',
456: 'bar'
}
]
}
// dot.dot(obj)
{
'items[0].123': 'foo',
'items[0].456': 'bar'
}
But when you run that through dot.object(), you don't get the original object. You get a sparse array instead.
{
items: [
[
...123 empty slots...
'foo',
...333 empty slots...
'bar'
]
]
}
Is there an option to use objects for . in all cases, even when the key is an integer?
Reading through some of the other issues, it seems this may be intended behavior. We have enabled the option to output brackets around array indices.
But when you run that through
dot.object(), you don't get the original object. You get a sparse array instead.Is there an option to use objects for
.in all cases, even when the key is an integer?