-
Notifications
You must be signed in to change notification settings - Fork 45
Open
Description
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?
Metadata
Metadata
Assignees
Labels
No labels