I have a map returned by performing certain operations on a json data retrieved from a server. The map structure looks like follows when i print the key and values
action = [object Map]
comedy = [object Map]
thriller = [object Map]
And with in a object Map (i.e when i just print the values) they have counts which i expect.
Map {
'spanish' => 3
'english' => 4
}
Map {
'spanish' => 1
'english' => 2
}
I want to convert the nested map inside an array based something like this. is there already existing libraries i can leverage off?
var comedy[] = ['spanish_1', 'english_2']
var action[] =['spanish_3', 'english_4']
Please suggest if this is the ideal way to handle this data as i am finding it difficult to get the data out of the nested map.