I am writing a program, counting words in a file.
Suppose the object likes this:
{
I: 2,
it: 4,
that: 1
}
And I wanna make it:
[
{ word: 'I', count: 2 },
{ word: 'it', count: 4 },
{ word: 'that', count: 1 }
]
I can achieve the goal by using imperative programming: loop the object...
And I check out the docs and google, but can't find any method fit in :(
Thanks