Mapreduce java script to find the avg temperture

Thanks for the reply jens… How to achieve the following output provided the same json input…
‘rows’:[ ‘keys’:‘201405’,‘value’:{{‘city’:‘london’, ‘temp’:12 },
{‘city’:‘paris’, ‘temp’:‘15’}}
‘keys’:‘201505’,‘value’:{{‘city’:‘london’, ‘temp’:12 },
{‘city’:‘paris’, ‘temp’:‘11’},
{‘city’:‘niveda’, ‘temp’:‘10’}}
]
It would be really helpful if you can guide me to achieve this…
Thanks…