I have the following data structure:
{
'url' : 'www.example.com',
'title' : 'This is a title',
'data' : [
[{'name': 'abcdefg'}, {'nmr': 'hijklmnop'}],
[{'name': 'hijklmnop'}, {'nmr': 'abcdefg'}]
]
},
{
'url' : 'www.example_2.com',
'title' : 'This is a title_2',
'data' : [
[{'name': 'abcdefg'}, {'nmr': 'hijklmnop'}],
[{'name': 'hijklmnop'}, {'nmr': 'abcdefg'}],
[{'name': 'abcdefg'}, {'nmr': 'hijklmnop'}]
]
}
I need to sort by 'url' (descending order) according to the total number of names in 'data'. I expect to see something like this:
www.example_2.com : 3
www.example.com : 2
Any help is highly appreciated.