42
rated 0 times
[
46]
[
4]
/ answers: 1 / hits: 49433
/ 9 Years ago, wed, august 19, 2015, 12:00:00
I'm about to use forOwn
to iterate through an object's properties and create an array manually and can't helping thinking there's a oneliner already available to do it.
{
prop1 : value,
prop2: { sub:1}
}
to:
[
{key: prop1, value: value},
{key: prop2, value: {sub:1}}
]
Thanks
More From » lodash