Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Run results for:
Custom Flatmap
Comparison between using JS' native flatMap, a custom flatMap, and lodash's flatMap. Custom flatMap works with all Iterable types, so need to convert Map's to arrays before flatMapping.
Go to the benchmark
Embed
Embed Benchmark Result
Run details:
User agent:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/130.0.0.0 Safari/537.36
Browser:
Chrome 130
Operating system:
Windows
Device Platform:
Desktop
Date tested:
one year ago
Test name
Executions per second
Native JS flatMap
19338.1 Ops/sec
Custom flatMap
56718.5 Ops/sec
HTML Preparation code:
<script src='https://cdnjs.cloudflare.com/ajax/libs/lodash.js/4.17.21/lodash.min.js'></script>
Script Preparation code:
const locations = [ {'county': 'Mid Glamorgan', 'town': 'Aberdare'}, {'county': 'Aberdeenshire', 'town': 'Aberdeen'}, {'county': 'Gwynedd', 'town': 'Aberdovey'}, {'county': 'Gwent', 'town': 'Abergavenny'}, {'county': 'Clwyd', 'town': 'Abergele'}, {'county': 'Gwent', 'town': 'Abertillery'}, {'county': 'Dyfed', 'town': 'Aberystwyth'}, {'county': 'Oxfordshire', 'town': 'Abingdon'}, {'county': 'Lancashire', 'town': 'Accrington'}, {'county': 'Lanarkshire', 'town': 'Airdrie'}, {'county': 'Warwickshire', 'town': 'Alcester'}, {'county': 'Suffolk', 'town': 'Aldeburgh'}, {'county': 'Cheshire', 'town': 'Alderley Edge'}, {'county': 'Hampshire', 'town': 'Aldershot'}, {'county': 'Derbyshire', 'town': 'Alfreton'}, {'county': 'Ross-shire', 'town': 'Alness'}, {'county': 'Northumberland', 'town': 'Alnwick'}, {'county': 'Hampshire', 'town': 'Alresford'}, {'county': 'Cumbria', 'town': 'Alston'}, {'county': 'Hampshire', 'town': 'Alton'}, {'county': 'Cheshire', 'town': 'Altrincham'}, {'county': 'Cumbria', 'town': 'Ambleside'}, {'county': 'Buckinghamshire', 'town': 'Amersham'}, {'county': 'Wiltshire', 'town': 'Amesbury'}, {'county': 'Carmarthenshire', 'town': 'Ammanford'}, {'county': 'Hampshire', 'town': 'Andover'}, {'county': 'Fife', 'town': 'Anstruther'}, {'county': 'Co Antrim', 'town': 'Antrim'}, {'county': 'Cumbria', 'town': 'Appleby-in-Westmorland'}, {'county': 'Angus', 'town': 'Arbroath'}, {'county': 'Ayrshire', 'town': 'Ardrossan'}, {'county': 'Co Armagh', 'town': 'Armagh'}, {'county': 'Gwynedd', 'town': 'Arthog'}, {'county': 'West Sussex', 'town': 'Arundel'}, {'county': 'Berkshire', 'town': 'Ascot'}, {'county': 'Derbyshire', 'town': 'Ashbourne'}, {'county': 'Devon', 'town': 'Ashburton'}, {'county': 'Kent', 'town': 'Ashford'}, {'county': 'Middlesex', 'town': 'Ashford'}, {'county': 'Northumberland', 'town': 'Ashington'}, {'county': 'Surrey', 'town': 'Ashtead'}, {'county': 'Greater Manchester', 'town': 'Ashton-under-Lyne'}, {'county': 'Norfolk', 'town': 'Attleborough'}, {'county': 'Inverness-shire', 'town': 'Aviemore'}, {'county': 'Devon', 'town': 'Axminster'}, {'county': 'Buckinghamshire', 'town': 'Aylesbury'}, {'county': 'Ayrshire', 'town': 'Ayr'}, {'county': 'Gwynedd', 'town': 'Bala'}, {'county': 'Hertfordshire', 'town': 'Baldock'}, {'county': 'Argyll', 'town': 'Ballachulish'}, {'county': 'Co Antrim', 'town': 'Ballycastle'}, {'county': 'Co Antrim', 'town': 'Ballyclare'}, {'county': 'Co Antrim', 'town': 'Ballymena'}, {'county': 'Co Antrim', 'town': 'Ballymoney'}, {'county': 'Northumberland', 'town': 'Bamburgh'}, {'county': 'Devon', 'town': 'Bamstaple'}, {'county': 'Co Down', 'town': 'Banbridge'}, {'county': 'Oxfordshire', 'town': 'Banbury'}, {'county': 'Kincardineshire', 'town': 'Banchory'}, {'county': 'Aberdeenshire', 'town': 'Banff'}, {'county': 'Co Down', 'town': 'Bangor'}, {'county': 'Gwynedd', 'town': 'Bangor'}, {'county': 'Surrey', 'town': 'Banstead'}, {'county': 'Essex', 'town': 'Barking'}, {'county': 'Gwynedd', 'town': 'Barmouth'}, {'county': 'Co Durham', 'town': 'Barnard Castle'}, {'county': 'Hertfordshire', 'town': 'Barnet'}, {'county': 'South Yorkshire', 'town': 'Barnsley'}, {'county': 'Devon', 'town': 'Barnstaple'}, {'county': 'South Glamorgan', 'town': 'Barry'}, {'county': 'Cumbria', 'town': 'Barrow-in Furness'}, {'county': 'South Humberside', 'town': 'Barton-upon-Humber'}, {'county': 'Essex', 'town': 'Basildon'}, {'county': 'Hampshire', 'town': 'Basingstoke'}, {'county': 'Avon', 'town': 'Bath'}, {'county': 'West Lothian', 'town': 'Bathgate'}, {'county': 'East Sussex', 'town': 'Battle'}, {'county': 'Gwynedd', 'town': 'Beaumaris'}, {'county': 'Suffolk', 'town': 'Beccles'}, {'county': 'Kent', 'town': 'Beckenham'}, {'county': 'North Yorkshire', 'town': 'Bedale'}, {'county': 'Bedfordshire', 'town': 'Bedford'}, {'county': 'Belfast', 'town': 'Belfast'}, {'county': 'Kent', 'town': 'Belvedere'}, {'county': 'Essex', 'town': 'Benneet'}, {'county': 'Hertfordshire', 'town': 'Berkhamsted'}, {'county': 'Northumberland', 'town': 'Berwick-on-Tweed'}, {'county': 'Conwy', 'town': 'Betws-y-Coed'}, {'county': 'North Humberside', 'town': 'Beverley'}, {'county': 'Worcestershire', 'town': 'Bewdley'}, {'county': 'East Sussex', 'town': 'Bexhill-on-Sea'}, {'county': 'Oxfordshire', 'town': 'Bicester'}, {'county': 'Devon', 'town': 'Bideford'}, {'county': 'Lanarkshire', 'town': 'Biggar'}, {'county': 'Bedfordshire', 'town': 'Biggleswade'}, {'county': 'Essex', 'town': 'Billericay'}, {'county': 'West Sussex', 'town': 'Billingshurst'}, {'county': 'West Yorkshire', 'town': 'Bingley'}, {'county': 'Merseyside', 'town': 'Birkenhead'}, {'county': 'West Midlands', 'town': 'Birmingham'}, {'county': 'Co Durham', 'town': 'Bishop Auckland'}, {'county': 'Shropshire', 'town': 'Bishops Castle'}, {'county': 'Hertfordshire', 'town': 'Bishop\'s Stortford'}, {'county': 'Hampshire', 'town': 'Bishops Waltham'}, {'county': 'Lancashire', 'town': 'Blackburn'}, {'county': 'Lancashire', 'town': 'Blackpool'}, {'county': 'Gwynedd', 'town': 'Blaenau Ffestiniog'}, {'county': 'Perthshire', 'town': 'Blairgowrie'}, {'county': 'Dorset', 'town': 'Blandford Forum'}, {'county': 'Tyne & Wear', 'town': 'Blaydon-on-Tyne'}, {'county': 'Cornwall', 'town': 'Bodmin'}, {'county': 'West Sussex', 'town': 'Bognor Regis'}, {'county': 'Tyne & Wear', 'town': 'Boldon Colliery'}, {'county': 'Lancashire', 'town': 'Bolton'}, {'county': 'Midlothian', 'town': 'Bonnyrigg'}, {'county': 'Merseyside', 'town': 'Bootle'}, {'county': 'Hampshire', 'town': 'Bordon'}, {'county': 'Hertfordshire', 'town': 'Borehamwood'}, {'county': 'Lincolnshire', 'town': 'Boston'}, {'county': 'West Lothian', 'town': 'Botness'}, {'county': 'Lincolnshire', 'town': 'Bourne'}, {'county': 'Dorset', 'town': 'Bournemouth'}, {'county': 'Northamptonshire', 'town': 'Brackley'}, {'county': 'Berkshire', 'town': 'Bracknell'}, {'county': 'West Yorkshire', 'town': 'Bradford'}, {'county': 'Essex', 'town': 'Braintree'}, {'county': 'Cumbria', 'town': 'Brampton'}, {'county': 'Devon', 'town': 'Braunton'}, {'county': 'Powys', 'town': 'Brecon'}, {'county': 'Middlesex', 'town': 'Brentford'}, {'county': 'Essex', 'town': 'Brentwood'}, {'county': 'Mid Glamorgan', 'town': 'Bridgend'}, {'county': 'Shropshire', 'town': 'Bridgnorth'}, {'county': 'Somerset', 'town': 'Bridgwater'}, {'county': 'North Humberside', 'town': 'Bridlington'}, {'county': 'Dorset', 'town': 'Bridport'}, {'county': 'Lincolnshire', 'town': 'Brigg'}, {'county': 'West Yorkshire', 'town': 'Brighouse'}, {'county': 'East Sussex', 'town': 'Brighton'}, {'county': 'Avon', 'town': 'Bristol'}, {'county': 'Devon', 'town': 'Brixham'}, {'county': 'Isle of Skye', 'town': 'Broadford'}, {'county': 'Kent', 'town': 'Broadstairs'}, {'county': 'Hereford & Worcester', 'town': 'Broadway'}, {'county': 'Hampshire', 'town': 'Brockenhurst'}, {'county': 'Isle of Arran', 'town': 'Brodick'}, {'county': 'Kent', 'town': 'Bromley'}, {'county': 'Hereford & Worcester', 'town': 'Bromsgrove'}, {'county': 'Norfolk', 'town': 'Brooke'}, {'county': 'West Lothian', 'town': 'Broxburn'}, {'county': 'Devon', 'town': 'Buckfastleigh'}, {'county': 'Essex', 'town': 'Buckhurst Hill'}, {'county': 'Banffshire', 'town': 'Buckie'}, {'county': 'Buckinghamshire', 'town': 'Buckingham'}, {'county': 'Cornwall', 'town': 'Bude'}, {'county': 'Devon', 'town': 'Budleigh Salterton'}, {'county': 'Powys', 'town': 'Builth Wells'}, {'county': 'Isle of Mull', 'town': 'Bunessan'}, {'county': 'Suffolk', 'town': 'Bungay'}, {'county': 'West Sussex', 'town': 'Burgess Hill'}, {'county': 'Somerset', 'town': 'Burnham-on-Sea'}, {'county': 'Lancashire', 'town': 'Burnley'}, {'county': 'Staffordshire', 'town': 'Burton-on-Trent'}, {'county': 'Lancashire', 'town': 'Bury'}, {'county': 'Suffolk', 'town': 'Bury St Edmunds'}, {'county': 'Co Antrim', 'town': 'Bushmills'}, {'county': 'Derbyshire', 'town': 'Buxton'}, {'county': 'Gwynedd', 'town': 'Caernarvon'}, {'county': 'Mid Glamorgan', 'town': 'Caerphilly'}, {'county': 'Wiltshire', 'town': 'Calne'}, {'county': 'Surrey', 'town': 'Camberley'}, {'county': 'Cambridgeshire', 'town': 'Cambridge'}, {'county': 'Cornwall', 'town': 'Camelford'}, {'county': 'Argyll', 'town': 'Campbeltown'}, {'county': 'Staffordshire', 'town': 'Cannock'}, {'county': 'Kent', 'town': 'Canterbury'}, {'county': 'South Glamorgan', 'town': 'Cardiff'}, {'county': 'Dyfed', 'town': 'Cardigan'}, {'county': 'Cumbria', 'town': 'Carlisle'}, {'county': 'Isle of Lewis', 'town': 'Carloway'}, {'county': 'Lanarkshire', 'town': 'Carluke'}, {'county': 'Dyfed', 'town': 'Carmarthen'}, {'county': 'Lancashire', 'town': 'Carnforth'}, {'county': 'Co Antrim', 'town': 'Carrickfergus'}, {'county': 'Surrey', 'town': 'Carshalton'}, {'county': 'Kirkcudbrightshire', 'town': 'Castle Douglas'}, {'county': 'Co Tyrone', 'town': 'Castlederg'}, {'county': 'Isle of Man', 'town': 'Castletown'}, {'county': 'Co Down', 'town': 'Castlewellan'}, {'county': 'Surrey', 'town': 'Caterham'}, {'county': 'Gwynedd', 'town': 'Cemmaes Bay'}, {'county': 'Gwynedd', 'town': 'Cemmaes Road'}, {'county': 'Dorset', 'town': 'Cerne Abbas'}, {'county': 'Somerset', 'town': 'Chard'}, {'county': 'Kent', 'town': 'Chatham'}, {'county': 'Cambridgeshire', 'town': 'Chatteris'}, {'county': 'Cheshire', 'town': 'Cheadle'}, {'county': 'Surrey', 'town': 'Cheam'}, {'county': 'Somerset', 'town': 'Cheddar'}, {'county': 'Essex', 'town': 'Chelmsford'}, {'county': 'Gloucestershire', 'town': 'Cheltenham'}, {'county': 'Gwent', 'town': 'Chepstow'}, {'county': 'Surrey', 'town': 'Chertsey'}, {'county': 'Buckinghamshire', 'town': 'Chesham'}, {'county': 'Cheshire', 'town': 'Chester'}, {'county': 'Co Durham', 'town': 'Chester-le-Street'}, {'county': 'Derbyshire', 'town': 'Chesterfield'}, {'county': 'West Sussex', 'town': 'Chichester'}, {'county': 'Wiltshire', 'town': 'Chippenham'}, {'county': 'Oxfordshire', 'town': 'Chipping Norton'}, {'county': 'Gloucestershire', 'town': 'Chipping Sodbury'}, {'county': 'Lancashire', 'town': 'Chorley'}, {'county': 'Dorset', 'town': 'Christchurch'}, {'county': 'Shropshire', 'town': 'Church Stretton'}, {'county': 'Gloucestershne', 'town': 'Cinderford'}, {'county': 'Gloucestershire', 'town': 'Cirencester'}, {'county': 'Essex', 'town': 'Clacton-on-Sea'}, {'county': 'South Humberside', 'town': 'Cleethorpes'}, {'county': 'Avon', 'town': 'Clevedon'}, {'county': 'Lancashire', 'town': 'Clitheroe'}, {'county': 'Co Tyrone', 'town': 'Clogher'}, {'county': 'Northamptonshire', 'town': 'Clopton'}, {'county': 'Leicestershire', 'town': 'Coalville'}, {'county': 'Lanarkshire', 'town': 'Coatbridge'}, {'county': 'Surrey', 'town': 'Cobham'}, {'county': 'Cumbria', 'town': 'Cockermouth'}, {'county': 'Essex', 'town': 'Colchester'}, {'county': 'Warwickshire', 'town': 'Coleshill'}, {'county': 'Co Londonderry', 'town': 'Coleraine'}, {'county': 'Clwyd', 'town': 'Colwyn Bay'}, {'county': 'Cheshire', 'town': 'Congleton'}, {'county': 'Cumbria', 'town': 'Coniston'}, {'county': 'Co Durham', 'town': 'Consett'}, {'county': 'Gwynedd', 'town': 'Conwy'}, {'county': 'Co Tyrone', 'town': 'Cookstown'}, {'county': 'Lancashire', 'town': 'Coppull'}, {'county': 'Northumberland', 'town': 'Corbridge'}, {'county': 'Northamptonshire', 'town': 'Corby'}, {'county': 'Clwyd', 'town': 'Corwen'}, {'county': 'Surrey', 'town': 'Coulsdon'}, {'county': 'West Midlands', 'town': 'Coventry'}, {'county': 'Co Armagh', 'town': 'Craigavon'}, {'county': 'Northumberland', 'town': 'Cramlington'}, {'county': 'Kent', 'town': 'Cranbrook'}, {'county': 'Surrey', 'town': 'Cranleigh'}, {'county': 'Shropshire', 'town': 'Craven Arms'}, {'county': 'West Sussex', 'town': 'Crawley'}, {'county': 'Devon', 'town': 'Crediton'}, {'county': 'Cheshire', 'town': 'Crewe'}, {'county': 'Perthshire', 'town': 'Crieff'}, {'county': 'Norfolk', 'town': 'Cromer'}, {'county': 'East Sussex', 'town': 'Crowborough'}, {'county': 'Inverness-shire', 'town': 'Croy'}, {'county': 'Surrey', 'town': 'Croydon'}, {'county': 'Co Antrim', 'town': 'Crumlin'}, {'county': 'Devon', 'town': 'Cullompton'}, {'county': 'East Ayrshire', 'town': 'Cumnock'}, {'county': 'Fife', 'town': 'Cupar'}, {'county': 'Gwent', 'town': 'Cwmbran'}, {'county': 'Essex', 'town': 'Dagenham'}, {'county': 'Kirkcudbrightshire', 'town': 'Dalbeattie'}, {'county': 'Argyll', 'town': 'Dalmally'}, {'county': 'Ayrshire', 'town': 'Dalry'}, {'county': 'Co Durham', 'town': 'Darlington'}, {'county': 'Kent', 'town': 'Dartford'}, {'county': 'Ayrshire', 'town': 'Darvel'}, {'county': 'Northamptonshire', 'town': 'Daventry'}, {'county': 'Kent', 'town': 'Deal'}, {'county': 'Clwyd', 'town': 'Deeside'}, {'county': 'Derbyshire', 'town': 'Derby'}, {'county': 'Norfolk', 'town': 'Dereham'}, {'county': 'Wiltshire', 'town': 'Devizes'}, {'county': 'West Yorkshire', 'town': 'Dewsbury'}, {'county': 'Oxfordshire', 'town': 'Didcot'}, {'county': 'South Glamorgan', 'town': 'Dinas Powis'}, {'county': 'Ross-shire', 'town': 'Dingwall'}, {'county': 'Norfolk', 'town': 'Diss'}, {'county': 'Gwynedd', 'town': 'Dolgellau'}, {'county': 'South Yorkshire', 'town': 'Doncaster'}, {'county': 'Dorset', 'town': 'Dorchester'}, {'county': 'Surrey', 'town': 'Dorking'}, {'county': 'Sutherland', 'town': 'Dornoch'}, {'county': 'Isle of Man', 'town': 'Douglas'}, {'county': 'Kent', 'town': 'Dover'}, {'county': 'Norfolk', 'town': 'Downham Market'}, {'county': 'Co Down', 'town': 'Downpatrick'}, {'county': 'North Humberside', 'town': 'Driffield'}, {'county': 'Hereford & Worcester', 'town': 'Droitwich'}, {'county': 'Co Down', 'town': 'Dromore'}, {'county': 'West Midlands', 'town': 'Dudley'}, {'county': 'Somerset', 'town': 'Dulverton'}, {'county': 'Dunbartonshire', 'town': 'Dumbarton'}, {'county': 'Dumfriesshire', 'town': 'Dumfries'}, {'county': 'East Lothian', 'town': 'Dunbar'}, {'county': 'Perthshire', 'town': 'Dunblane'}, {'county': 'Angus', 'town': 'Dundee'}, {'county': 'Fife', 'town': 'Dunfermline'}, {'county': 'Co Tyrone', 'town': 'Dungannon'}, {'county': 'Perthshire', 'town': 'Dunkeld'}, {'county': 'Essex', 'town': 'Dunmow'}, {'county': 'Belfast', 'town': 'Dunmurry'}, {'county': 'Argyll', 'town': 'Dunoon'}, {'county': 'Berwickshire', 'town': 'Duns'}, {'county': 'Bedfordshire', 'town': 'Dunstable'}, {'county': 'Co Durham', 'town': 'Durham'}, {'county': 'Gloucestershire', 'town': 'Dursley'}, {'county': 'North Yorkshire', 'town': 'Easingwold'}, {'county': 'West Sussex', 'town': 'East Grinstead'}, {'county': 'South Lanarkshire', 'town': 'East Kilbride'}, {'county': 'Surrey', 'town': 'East Molesey'}, {'county': 'East Sussex', 'town': 'Eastbourne'}, {'county': 'Hampshire', 'town': 'Eastleigh'}, {'county': 'Kent', 'town': 'Ebbsfleet'}, {'county': 'Gwent', 'town': 'Ebbw Vale'}, {'county': 'Kent', 'town': 'Edenbridge'}, {'county': 'Middlesex', 'town': 'Edgware'}, {'county': 'Edinburgh', 'town': 'Edinburgh'}, {'county': 'Surrey', 'town': 'Egham'}, {'county': 'Morayshire', 'town': 'Elgin'}, {'county': 'Cheshire', 'town': 'Ellesmere Port'}, {'county': 'Aberdeenshire', 'town': 'Ellon'}, {'county': 'Cambridgeshire', 'town': 'Ely'}, {'county': 'Hampshire', 'town': 'Emsworth'}, {'county': 'Middlesex', 'town': 'Enfeld'}, {'county': 'Co Fermanagh', 'town': 'Enniskillen'}, {'county': 'Essex', 'town': 'Epping'}, {'county': 'Surrey', 'town': 'Epsom'}, {'county': 'Kent', 'town': 'Erith'}, {'county': 'Surrey', 'town': 'Esher'}, {'county': 'Worcestershire', 'town': 'Evesham'}, {'county': 'Devon', 'town': 'Exeter'}, {'county': 'Devon', 'town': 'Exmouth'}, {'county': 'Norfolk', 'town': 'Fakenham'}, {'county': 'Stirlingshire', 'town': 'Falkirk'}, {'county': 'Cornwall', 'town': 'Falmouth'}, {'county': 'Hampshire', 'town': 'Fareham'}, {'county': 'Oxfordshire', 'town': 'Faringdon'}, {'county': 'Hampshire', 'town': 'Farnborough'}, {'county': 'Surrey', 'town': 'Farnham'}, {'county': 'Suffolk', 'town': 'Felixstowe'}, {'county': 'Dyfed', 'town': 'Fishguard'}, {'county': 'Co Tyrone', 'town': 'Fivemiletown'}, {'county': 'Hampshire', 'town': 'Fleet'}, {'county': 'Lancashire', 'town': 'Fleetwood'}, {'county': 'Clwyd', 'town': 'Flint'}, {'county': 'Kent', 'town': 'Folkestone'}, {'county': 'Angus', 'town': 'Forfar'}, {'county': 'Inverness-shire', 'town': 'Fort William'}, {'county': 'Ross-shire', 'town': 'Fortrose'}, {'county': 'Cornwall', 'town': 'Fowey'}, {'county': 'Aberdeenshire', 'town': 'Fraserburgh'}, {'county': 'Isle of Wight', 'town': 'Freshwater'}, {'county': 'Essex', 'town': 'Frinton-on-Sea'}, {'county': 'Somerset', 'town': 'Frome'}, {'county': 'Lincolnshire', 'town': 'Gainsborough'}, {'county': 'Ross-shire', 'town': 'Gairloch'}, {'county': 'Selkirkshire', 'town': 'Galasheils'}, {'county': 'Lancashire', 'town': 'Garstang'}, {'county': 'Tyne & Wear', 'town': 'Gateshead'}, {'county': 'Buckinghamshire', 'town': 'Gerrards Cross'}, {'county': 'Dorset', 'town': 'Gillingham'}, {'county': 'Kent', 'town': 'Gillingham'}, {'county': 'South Ayrshire', 'town': 'Girvan'}, {'county': 'Rotherham', 'town': 'Glamorgan'}, {'county': 'Glasgow', 'town': 'Glasgow'}, {'county': 'Somerset', 'town': 'Glastonbury'}, {'county': 'Fife', 'town': 'Glenrothes'}, {'county': 'Derbyshire', 'town': 'Glossop'}, {'county': 'Gloucestershire', 'town': 'Gloucester'}, {'county': 'Surrey', 'town': 'Godalming'}, {'county': 'Surrey', 'town': 'Godstone'}, {'county': 'East Riding of Yorkshire', 'town': 'Goole'}, {'county': 'Cumbria', 'town': 'Gosforth'}, {'county': 'Hampshire', 'town': 'Gosport'}, {'county': 'Cumbria', 'town': 'Grange-over-Sands'}, {'county': 'Midlothian', 'town': 'Grangemouth'}, {'county': 'Lincolnshire', 'town': 'Grantham'}, {'county': 'Kent', 'town': 'Gravesend'}, {'county': 'Essex', 'town': 'Grays Thurrock'}, {'county': 'Essex', 'town': 'Great Dunmow'}, {'county': 'Buckinghamshire', 'town': 'Great Missenden'}, {'county': 'Norfolk', 'town': 'Great Yarmouth'}, {'county': 'Middlesex', 'town': 'Greenford'}, {'county': 'Renfrewshire', 'town': 'Greenock'}, {'county': 'Dumfriesshire', 'town': 'Gretna'}, {'county': 'South Humberside', 'town': 'Grimsby'}, {'county': 'Channel Islands', 'town': 'Guernsey'}, {'county': 'Surrey', 'town': 'Guildford'}, {'county': 'North Yorkshire', 'town': 'Guisborough'}, {'county': 'West Yorkshire', 'town': 'Guiseley'}, {'county': 'East Lothian', 'town': 'Gullane'}, {'county': 'Lanark shire', 'town': 'Hamilton'}, {'county': 'East Lothian', 'town': 'Haddington'}, {'county': 'East Sussex', 'town': 'Hailsham'}, {'county': 'West Midlands', 'town': 'Halesowen'}, {'county': 'West Yorkshire', 'town': 'Halifax'}, {'county': 'Essex', 'town': 'Halstead'}, {'county': 'Northumberland', 'town': 'Haltwhistle'}, {'county': 'Middlesex', 'town': 'Hampton'}, {'county': 'Essex', 'town': 'Harlow'}, {'county': 'Hertfordshire', 'town': 'Harpenden'}, {'county': 'North Yorkshire', 'town': 'Harrogate'}, {'county': 'Middlesex', 'town': 'Harrow'}, {'county': 'Cleveland', 'town': 'Hartlepool'}, {'county': 'Essex', 'town': 'Harwich'}, {'county': 'Surrey', 'town': 'Haslemere'}, {'county': 'West Sussex', 'town': 'Hassocks'}, {'county': 'East Sussex', 'town': 'Hastings'}, {'county': 'Hertfordshire', 'town': 'Hatfield'}, {'county': 'Derbyshire', 'town': 'Hathersage'}, {'county': 'Hampshire', 'town': 'Havant'}, {'county': 'Pembrokeshire', 'town': 'Haverfordwest'}, {'county': 'Suffolk', 'town': 'Haverhill'}, {'county': 'Roxburghshire', 'town': 'Hawick'}, {'county': 'Cumbria', 'town': 'Hawkshead'}, {'county': 'Powys', 'town': 'Hay-on-Wye'}, {'county': 'Middlesex', 'town': 'Hayes'}, {'county': 'Hampshire', 'town': 'Hayling Island'}, {'county': 'West Sussex', 'town': 'Haywards Heath'}, {'county': 'Derbyshire', 'town': 'Heanor'}, {'county': 'East Sussex', 'town': 'Heathfield'}, {'county': 'West Yorkshire', 'town': 'Hebden Bridge'}, {'county': 'Dunbartonshire', 'town': 'Helensburgh'}, {'county': 'North Yorkshire', 'town': 'Helmsley'}, {'county': 'Cornwall', 'town': 'Helston'}, {'county': 'Hertfordshire', 'town': 'Hemel Hempstead'}, {'county': 'West Sussex', 'town': 'Henfield'}, {'county': 'Oxfordshire', 'town': 'Henley-on-Thames'}, {'county': 'Hereford & Worcester', 'town': 'Hereford'}, {'county': 'Kent', 'town': 'Herne Bay'}, {'county': 'Hertfordshire', 'town': 'Hertford'}, {'county': 'North Humberside', 'town': 'Hessle'}, {'county': 'Northumberland', 'town': 'Hexham'}, {'county': 'Lancashire', 'town': 'Heywood'}, {'county': 'Buckinghamshire', 'town': 'High Wycombe'}, {'county': 'Somerset', 'town': 'Highbridge'}, {'county': 'Co Down', 'town': 'Hillsborough'}, {'county': 'Leicestershire', 'town': 'Hinckley'}, {'county': 'Surrey', 'town': 'Hindhead'}, {'county': 'Hertfordshire', 'town': 'Hitchin'}, {'county': 'Essex', 'town': 'Hockley'}, {'county': 'Hertfordshire', 'town': 'Hoddesdon'}, {'county': 'Lincolnshire', 'town': 'Holbeach'}, {'county': 'Cheshire', 'town': 'Holmes Chapel'}, {'county': 'Devon', 'town': 'Holsworthy'}, {'county': 'Norfolk', 'town': 'Holt'}, {'county': 'Gwynedd', 'town': 'Holyhead'}, {'county': 'Co Down', 'town': 'Holywood'}, {'county': 'Lincolnshire', 'town': 'Honington'}, {'county': 'Devon', 'town': 'Honiton'}, {'county': 'Hampshire', 'town': 'Hook'}, {'county': 'Surrey', 'town': 'Horley'}, {'county': 'Lancashire', 'town': 'Hornby'}, {'county': 'Essex', 'town': 'Hornchurch'}, {'county': 'East Riding of Yorkshire', 'town': 'Hornsea'}, {'county': 'West Sussex', 'town': 'Horsham'}, {'county': 'Tyne & Wear', 'town': 'Houghton le Spring'}, {'county': 'Middlesex', 'town': 'Hounslow'}, {'county': 'East Sussex', 'town': 'Hove'}, {'county': 'West Yorkshire', 'town': 'Huddersfield'}, {'county': 'North Humberside', 'town': 'Hull'}, {'county': 'Berkshire', 'town': 'Hungerford'}, {'county': 'Norfolk', 'town': 'Hunstanton'}, {'county': 'Cambridgeshire', 'town': 'Huntingdon'}, {'county': 'Aberdeenshire', 'town': 'Huntly'}, {'county': 'Cheshire', 'town': 'Hyde'}, {'county': 'Kent', 'town': 'Hythe'}, {'county': 'Essex', 'town': 'Ilford'}, {'county': 'Devon', 'town': 'Ilfracombe'}, {'county': 'Derbyshire', 'town': 'Ilkeston'}, {'county': 'West Yorkshire', 'town': 'Ilkley'}, {'county': 'South Humberside', 'town': 'Immingham'}, {'county': 'Essex', 'town': 'Ingatestone'}, {'county': 'Aberdeenshire', 'town': 'Insch'}, {'county': 'Argyll', 'town': 'Inveraray'}, {'county': 'Inverness-shire', 'town': 'Inverness'}, {'county': 'Aberdeenshire', 'town': 'Inverurie'}, {'county': 'Isle of Iona', 'town': 'Iona'}, {'county': 'Staffordshire', 'town': 'Ipstones'}, {'county': 'Suffolk', 'town': 'Ipswich'}, {'county': 'Shropshire', 'town': 'Ironbridge'}, {'county': 'Isle of Wight', 'town': 'Isle of Wight'}, {'county': 'Middlesex', 'town': 'Isleworth'}, {'county': 'Channel Islands', 'town': 'Jersey'}, {'county': 'Renfrewshire', 'town': 'Johnstone'}, {'county': 'West Yorkshire', 'town': 'Keighley'}, {'county': 'Roxburghshire', 'town': 'Kelso'}, {'county': 'Cumbria', 'town': 'Kendal'}, {'county': 'Warwickshire', 'town': 'Kenilworth'}, {'county': 'Cumbria', 'town': 'Keswick'}, {'county': 'Northamptonshire', 'town': 'Kettering'}, {'county': 'Hereford & Worcester', 'town': 'Kidderminster'}, {'county': 'Ayrshire', 'town': 'Kilbirnie'}, {'county': 'Perthshire', 'town': 'Killin'}, {'county': 'Lincolnshire', 'town': 'Killingholme'}, {'county': 'Renfrewshire', 'town': 'Kilmacolm'}, {'county': 'Ayrshire', 'town': 'Kilmarnock'}, {'county': 'Norfolk', 'town': 'King\'s Lynn'}, {'county': 'Hertfordshire', 'town': 'Kings Langley'}, {'county': 'Devon', 'town': 'Kingsbridge'}, {'county': 'Surrey', 'town': 'Kingston upon Thames'}, {'county': 'West Midlands', 'town': 'Kingswinford'}, {'county': 'Herefordshire', 'town': 'Kington'}, {'county': 'Inverness-shire', 'town': 'Kingussie'}, {'county': 'Cumbria', 'town': 'Kirkby Stephen'}, {'county': 'Fife', 'town': 'Kirkcaldy'}, {'county': 'Northumberland', 'town': 'Kirkwhelpington'}, {'county': 'Angus', 'town': 'Kirriemuir'}, {'county': 'Powys', 'town': 'Knighton'}, {'county': 'Cheshire', 'town': 'Knutsford'}, {'county': 'Ross-shire', 'town': 'Kyle'}, {'county': 'Isle of Skye', 'town': 'Kyleakin'}, {'county': 'Essex', 'town': 'Laindon'}, {'county': 'Sutherland', 'town': 'Lairg'}, {'county': 'Ceredigion', 'town': 'Lampeter'}, {'county': 'Lanarkshire', 'town': 'Lanark'}, {'county': 'Lancashire', 'town': 'Lancaster'}, {'county': 'West Sussex', 'town': 'Lancing'}, {'county': 'Warwickshire', 'town': 'Lapworth'}, {'county': 'Stirlingshire', 'town': 'Larbert'}, {'county': 'Caithness', 'town': 'Latheron'}, {'county': 'Cornwall', 'town': 'Launceston'}, {'county': 'Warwickshire', 'town': 'Leamington Spa'}, {'county': 'Surrey', 'town': 'Leatherhead'}, {'county': 'Hereford & Worcester', 'town': 'Ledbury'}, {'county': 'West Yorkshire', 'town': 'Leeds'}, {'county': 'Leicestershire', 'town': 'Leicester'}, {'county': 'Lancashire', 'town': 'Leigh'}, {'county': 'Essex', 'town': 'Leigh-on-Sea'}, {'county': 'Bedfordshire', 'town': 'Leighton Buzzard'}, {'county': 'Suffolk', 'town': 'Leiston'}, {'county': 'Hereford & Worcester', 'town': 'Leominster'}, {'county': 'Isle of Shetland', 'town': 'Lerwick'}, {'county': 'Hertfordshire', 'town': 'Letchworth'}, {'county': 'East Sussex', 'town': 'Lewes'}, {'county': 'North Yorkshire', 'town': 'Leyburn'}, {'county': 'Lancashire', 'town': 'Leyland'}, {'county': 'Staffordshire', 'town': 'Lichfield'}, {'county': 'Surrey', 'town': 'Lightwater'}, {'county': 'Co Londonderry', 'town': 'Limavady'}, {'county': 'Lincolnshire', 'town': 'Lincoln'}, {'county': 'Surrey', 'town': 'Lingfield'}, {'county': 'Hampshire', 'town': 'Liphook'}, {'county': 'Co Antrim', 'town': 'Lisburn'}, {'county': 'Cornwall', 'town': 'Liskeard'}, {'county': 'Hampshire', 'town': 'Liss'}, {'county': 'Lancashire', 'town': 'Littleborough'}, {'county': 'West Sussex', 'town': 'Littlehampton'}, {'county': 'Merseyside', 'town': 'Liverpool'}, {'county': 'West Lothian', 'town': 'Livingston'}, {'county': 'Ceredigion', 'town': 'Llanarth'}, {'county': 'Gwynedd', 'town': 'Llanbedr'}, {'county': 'Carmarthenshire', 'town': 'Llandeilo'}, {'county': 'Carmarthenshire', 'town': 'Llandovery'}, {'county': 'Powys', 'town': 'Llandrindod Wells'}, {'county': 'Gwynedd', 'town': 'Llandudno'}, {'county': 'Dyfed', 'town': 'Llandysul'}, {'county': 'Dyfed', 'town': 'Llanelli'}, {'county': 'Clwyd', 'town': 'Llangollen'}, {'county': 'Powys', 'town': 'Llanidloes'}, {'county': 'Ceredigion', 'town': 'Llanon'}, {'county': 'Gwynedd', 'town': 'Llanrwst'}, {'county': 'South Glamorgan', 'town': 'Llantwit'}, {'county': 'Dyfed', 'town': 'Llanwrda'}, {'county': 'Powys', 'town': 'Llanwrtyd Wells'}, {'county': 'Midlothian', 'town': 'Loanhead'}, {'county': 'Isle of Uist', 'town': 'Lochboisdale'}, {'county': 'Ross-shire', 'town': 'Lochcarron'}, {'county': 'Argyll', 'town': 'Lochgilphead'}, {'county': 'Renfrewshire', 'town': 'Lochwinnoch'}, {'county': 'Dumfriesshire', 'town': 'Lockerbie'}, {'county': 'London', 'town': 'London'}, {'county': 'Co Londonderry', 'town': 'Londonderry'}, {'county': 'Leicestershire', 'town': 'Loughborough'}, {'county': 'Essex', 'town': 'Loughton'}, {'county': 'Lincolnshire', 'town': 'Louth'}, {'county': 'Suffolk', 'town': 'Lowestoft'}, {'county': 'Shropshire', 'town': 'Ludlow'}, {'county': 'Co Antrim', 'town': 'Lurgan'}, {'county': 'Bedfordshire', 'town': 'Luton'}, {'county': 'Leicestershire', 'town': 'Lutterworth'}, {'county': 'Gloucestershire', 'town': 'Lydney'}, {'county': 'Hampshire', 'town': 'Lymington'}, {'county': 'Hampshire', 'town': 'Lyndhurst'}, {'county': 'Devon', 'town': 'Lynton'}, {'county': 'Lancashire', 'town': 'Lytham StAnnes'}, {'county': 'Cheshire', 'town': 'Macclesfield'}, {'county': 'Powys', 'town': 'Machynlleth'}, {'county': 'Cambridgeshire', 'town': 'Madingley'}, {'county': 'Mid Glamorgan', 'town': 'Maesteg'}, {'county': 'Co Londonderry', 'town': 'Magharafelt'}, {'county': 'Berkshire', 'town': 'Maidenhead'}, {'county': 'Kent', 'town': 'Maidstone'}, {'county': 'Essex', 'town': 'Maldon'}, {'county': 'Wiltshire', 'town': 'Malmesbury'}, {'county': 'Cheshire', 'town': 'Malpas'}, {'county': 'North Yorkshire', 'town': 'Malton'}, {'county': 'Hereford & Worcester', 'town': 'Malvern'}, {'county': 'Greater Manchester', 'town': 'Manchester'}, {'county': 'Nottinghamshire', 'town': 'Mansfield'}, {'county': 'Cambridgeshire', 'town': 'March'}, {'county': 'Kent', 'town': 'Margate'}, {'county': 'Shropshire', 'town': 'Market Drayton'}, {'county': 'Leicestershire', 'town': 'Market Harborough'}, {'county': 'Lincolnshire', 'town': 'Market Rasen'}, {'county': 'East Riding of Yorkshire', 'town': 'Market Weighton'}, {'county': 'Wiltshire', 'town': 'Marlborough'}, {'county': 'Buckinghamshire', 'town': 'Marlow'}, {'county': 'Lincolnshire', 'town': 'Martin'}, {'county': 'Cumbria', 'town': 'Maryport'}, {'county': 'Derbyshire', 'town': 'Matlock'}, {'county': 'Aberdeenshire', 'town': 'Maud'}, {'county': 'Kent', 'town': 'Medway'}, {'county': 'Powys', 'town': 'Meifod'}, {'county': 'Wiltshire', 'town': 'Melksham'}, {'county': 'Leicestershire', 'town': 'Melton Mowbray'}, {'county': 'Wiltshire', 'town': 'Mere'}, {'county': 'West Midlands', 'town': 'Meriden'}, {'county': 'Mid Glamorgan', 'town': 'Merthyr Tydfil'}, {'county': 'South Yorkshire', 'town': 'Mexborough'}, {'county': 'Cleveland', 'town': 'Middlesbrough'}, {'county': 'Cheshire', 'town': 'Middlewich'}, {'county': 'West Sussex', 'town': 'Midhurst'}, {'county': 'Suffolk', 'town': 'Mildenhall'}, {'county': 'Pembrokeshire', 'town': 'Milford Haven'}, {'county': 'Buckinghamshire', 'town': 'Milton Keynes'}, {'county': 'Somerset', 'town': 'Minehead'}, {'county': 'West Yorkshire', 'town': 'Mirfield'}, {'county': 'Surrey', 'town': 'Mitcham'}, {'county': 'Gloucestershire', 'town': 'Mitcheldean'}, {'county': 'Clwyd', 'town': 'Mold'}, {'county': 'Gwent', 'town': 'Monmouth'}, {'county': 'Powys', 'town': 'Montgomery'}, {'county': 'Angus', 'town': 'Montrose'}, {'county': 'Surrey', 'town': 'Morden'}, {'county': 'Lancashire', 'town': 'Morecambe'}, {'county': 'Devon', 'town': 'Moretonhampstead'}, {'county': 'Northumberiand', 'town': 'Morpeth'}, {'county': 'East Ayrshire', 'town': 'Moscow'}, {'county': 'Lanarkshire', 'town': 'Motherwell'}, {'county': 'Midlothian', 'town': 'Musselburgh'}, {'county': 'Avon', 'town': 'Nailsea'}, {'county': 'Inverness-shire', 'town': 'Nairn'}, {'county': 'Cheshire', 'town': 'Nantwich'}, {'county': 'Pembrokeshire', 'town': 'Narberth'}, {'county': 'Neath Port Talbot', 'town': 'Neath'}, {'county': 'Gwynedd', 'town': 'Nefyn'}, {'county': 'Lancashire', 'town': 'Nelson'}, {'county': 'Inverness-shire', 'town': 'Nethy Bridge'}, {'county': 'Surrey', 'town': 'New Malden'}, {'county': 'Derbyshire', 'town': 'New Mills'}, {'county': 'Nottinghamshire', 'town': 'Newark'}, {'county': 'Berkshire', 'town': 'Newbury'}, {'county': 'Co Down', 'town': 'Newcastle'}, {'county': 'Staffordshire', 'town': 'Newcastle'}, {'county': 'Dyfed', 'town': 'Newcastle Emlyn'}, {'county': 'Tyne & Wear', 'town': 'Newcastle upon Tyne'}, {'county': 'Roxburghshire', 'town': 'Newcastleton'}, {'county': 'Gloucestershire', 'town': 'Newent'}, {'county': 'East Sussex', 'town': 'Newhaven'}, {'county': 'Suffolk', 'town': 'Newmarket'}, {'county': 'Gwent', 'town': 'Newport'}, {'county': 'Isle of Wight', 'town': 'Newport'}, {'county': 'Shropshire', 'town': 'Newport'}, {'county': 'Buckinghamshire', 'town': 'Newport Pagnell'}, {'county': 'Cornwall', 'town': 'Newquay'}, {'county': 'Devon', 'town': 'Newton Abbot'}, {'county': 'Powys', 'town': 'Newtown'}, {'county': 'Merseyside', 'town': 'Newtown-le- Willows'}, {'county': 'Co Antrim', 'town': 'Newtownabbey'}, {'county': 'Co Down', 'town': 'Newtownards'}, {'county': 'East Lothian', 'town': 'North Berwick'}, {'county': 'Tyne & Wear', 'town': 'North Shields'}, {'county': 'Norfolk', 'town': 'North Walsham'}, {'county': 'North Yorkshire', 'town': 'Northallerton'}, {'county': 'Northamptonshire', 'town': 'Northampton'}, {'county': 'Cheshire', 'town': 'Northwich'}, {'county': 'Middlesex', 'town': 'Northwood'}, {'county': 'Norfolk', 'town': 'Norwich'}, {'county': 'Nottinghamshire', 'town': 'Nottingham'}, {'county': 'Nottinghamshire', 'town': 'Nottinghamshire'}, {'county': 'Warwickshire', 'town': 'Nuneaton'}, {'county': 'Leicestershire', 'town': 'Oakham'}, {'county': 'Argyll', 'town': 'Oban'}, {'county': 'Devon', 'town': 'Okehampton'}, {'county': 'Lancashire', 'town': 'Oldham'}, {'county': 'Co Tyrone', 'town': 'Omagh'}, {'county': 'Essex', 'town': 'Ongar'}, {'county': 'Lancashire', 'town': 'Ormskirk'}, {'county': 'Kent', 'town': 'Orpington'}, {'county': 'West Yorkshire', 'town': 'Ossett'}, {'county': 'Shropshire', 'town': 'Oswestry'}, {'county': 'West Yorkshire', 'town': 'Otley'}, {'county': 'Oxfordshire', 'town': 'Oxford'}, {'county': 'Surrey', 'town': 'Oxted'}, {'county': 'Devon', 'town': 'Paignton'}, {'county': 'Renfrewshire', 'town': 'Paisley'}, {'county': 'Suffolk', 'town': 'Pakenham'}, {'county': 'Cornwall', 'town': 'Par'}, {'county': 'Dyfed', 'town': 'Pembroke'}, {'county': 'South Glamorgan', 'town': 'Penarth'}, {'county': 'Herefordshire', 'town': 'Pencombe'}, {'county': 'Midlothian', 'town': 'Penicuik'}, {'county': 'Gwynedd', 'town': 'Penmaenmawr'}, {'county': 'Gwynedd', 'town': 'Penrhyndeudraeth'}, {'county': 'Cumbria', 'town': 'Penrith'}, {'county': 'Cornwall', 'town': 'Penryn'}, {'county': 'Cornwall', 'town': 'Penzance'}, {'county': 'Hereford & Worcester', 'town': 'Pershore'}, {'county': 'Perthshire', 'town': 'Perth'}, {'county': 'Cambridgeshire', 'town': 'Peterborough'}, {'county': 'Aberdeenshire', 'town': 'Peterhead'}, {'county': 'Hampshire', 'town': 'Petersfield'}, {'county': 'West Sussex', 'town': 'Petworth'}, {'county': 'East Sussex', 'town': 'Pevensey'}, {'county': 'Wiltshire', 'town': 'Pewsey'}, {'county': 'North Yorkshire', 'town': 'Pickering'}, {'county': 'Middlesex', 'town': 'Pinner'}, {'county': 'Perthshire', 'town': 'Pitlochry'}, {'county': 'Devon', 'town': 'Plymouth'}, {'county': 'East Riding of Yorkshire', 'town': 'Pocklington'}, {'county': 'West Yorkshire', 'town': 'Pontefract'}, {'county': 'Mid Glamorgan', 'town': 'Pontyclun'}, {'county': 'Torfaen', 'town': 'Pontypool'}, {'county': 'Mid Glamorgan', 'town': 'Pontypridd'}, {'county': 'Dorset', 'town': 'Poole'}, {'county': 'Cumbria', 'town': 'Pooley Bridge'}, {'county': 'Cornwall', 'town': 'Port Isaac'}, {'county': 'West Glamorgan', 'town': 'Port Talbot'}, {'county': 'Mid Glamorgan', 'town': 'Porthcawl'}, {'county': 'Gwynedd', 'town': 'Porthmadog'}, {'county': 'Isle of Skye', 'town': 'Portree'}, {'county': 'Co Antrim', 'town': 'Portrush'}, {'county': 'Hampshire', 'town': 'Portsmouth'}, {'county': 'Hertfordshire', 'town': 'Potters Bar'}, {'county': 'Lancashire', 'town': 'Poulton-le-Fylde'}, {'county': 'Merseyside', 'town': 'Prescot'}, {'county': 'Clwyd', 'town': 'Prestatyn'}, {'county': 'Lancashire', 'town': 'Preston'}, {'county': 'Ayrshire', 'town': 'Prestwick'}, {'county': 'Buckinghamshire', 'town': 'Princes Risborough'}, {'county': 'Northumberland', 'town': 'Prudhoe'}, {'county': 'West Sussex', 'town': 'Pulborough'}, {'county': 'Surrey', 'town': 'Purley'}, {'county': 'Gwynedd', 'town': 'Pwllheli'}, {'county': 'Hertfordshire', 'town': 'Radlett'}, {'county': 'Isle of Man', 'town': 'Ramsey'}, {'county': 'Kent', 'town': 'Ramsgate'}, {'county': 'Cumbria', 'town': 'Raughton Head'}, {'county': 'Essex', 'town': 'Rayleigh'}, {'county': 'Berkshire', 'town': 'Reading'}, {'county': 'Cleveland', 'town': 'Redcar'}, {'county': 'Hereford and', 'town': 'Redditch'}, {'county': 'Surrey', 'town': 'Redhill'}, {'county': 'Cornwall', 'town': 'Redruth'}, {'county': 'Surrey', 'town': 'Reigate'}, {'county': 'Nottmghamshire', 'town': 'Retford'}, {'county': 'Clwyd', 'town': 'Rhyl'}, {'county': 'North Yorkshire', 'town': 'Richmond'}, {'county': 'Surrey', 'town': 'Richmond'}, {'county': 'Hertfordshire', 'town': 'Rickmansworth'}, {'county': 'Northumberland', 'town': 'Riding Mill'}, {'county': 'Hampshire', 'town': 'Ringwood'}, {'county': 'Derbyshire', 'town': 'Ripley'}, {'county': 'North Yorkshire', 'town': 'Ripon'}, {'county': 'East Sussex', 'town': 'Robertsbridge'}, {'county': 'Lancashire', 'town': 'Rochdale'}, {'county': 'Kent', 'town': 'Rochester'}, {'county': 'Essex', 'town': 'Rochford'}, {'county': 'Hampshire', 'town': 'Rockbourne'}, {'county': 'Essex', 'town': 'Romford'}, {'county': 'Hampshire', 'town': 'Romsey'}, {'county': 'Herefordshire', 'town': 'Ross-on-Wye'}, {'county': 'Lancashire', 'town': 'Rossendale'}, {'county': 'Northumberland', 'town': 'Rothbury'}, {'county': 'South Yorkshire', 'town': 'Rotherham'}, {'county': 'Isle ofBute', 'town': 'Rothesay'}, {'county': 'Hertfordshire', 'town': 'Royston'}, {'county': 'Warwickshire', 'town': 'Rugby'}, {'county': 'Staffordshire', 'town': 'Rugeley'}, {'county': 'Middlesex', 'town': 'Ruislip'}, {'county': 'Cheshire', 'town': 'Runcorn'}, {'county': 'Northamptonshire', 'town': 'Rushden'}, {'county': 'Clwyd', 'town': 'Ruthin'}, {'county': 'East Sussex', 'town': 'Rye'}, {'county': 'Tyne & Wear', 'town': 'Ryton'}, {'county': 'Essex', 'town': 'Saffron Walden'}, {'county': 'Lancashire', 'town': 'Salford'}, {'county': 'Wiltshire', 'town': 'Salisbury'}, {'county': 'Cornwall', 'town': 'Saltash'}, {'county': 'Cleveland', 'town': 'Saltburn-by-the-Sea'}, {'county': 'Ayrshire', 'town': 'Saltcoats'}, {'county': 'Cheshire', 'town': 'Sandbach'}, {'county': 'Berkshire', 'town': 'Sandhurst'}, {'county': 'Isle of Wight', 'town': 'Sandown'}, {'county': 'Kent', 'town': 'Sandwich'}, {'county': 'Bedfordshire', 'town': 'Sandy'}, {'county': 'Dumfriesshire', 'town': 'Sanquhar'}, {'county': 'Hertfordshire', 'town': 'Sawbridgeworth'}, {'county': 'Suffolk', 'town': 'Saxmundham'}, {'county': 'North Yorkshire', 'town': 'Scarborough'}, {'county': 'Isle of Tiree', 'town': 'Scarinish'}, {'county': 'South Humberside', 'town': 'Scunthorpe'}, {'county': 'East Sussex', 'town': 'Seaford'}, {'county': 'Co Durham', 'town': 'Seaham'}, {'county': 'Northumberland', 'town': 'Seahouses'}, {'county': 'Devon', 'town': 'Seaton'}, {'county': 'Cumbria', 'town': 'Sedbergh'}, {'county': 'Co Durham', 'town': 'Sedgefield'}, {'county': 'North Yorkshire', 'town': 'Selby'}, {'county': 'Selkirkshire', 'town': 'Selkirk'}, {'county': 'North Yorkshire', 'town': 'Settle'}, {'county': 'Kent', 'town': 'Sevenoaks'}, {'county': 'Wiltshire', 'town': 'Shaftesbury'}, {'county': 'Cumbria', 'town': 'Shap'}, {'county': 'Isle of Lewis', 'town': 'Shawbost'}, {'county': 'South Yorkshire', 'town': 'Sheffield'}, {'county': 'Middlesex', 'town': 'Shepperton'}, {'county': 'Somerset', 'town': 'Shepton Mallet'}, {'county': 'Dorset', 'town': 'Sherborne'}, {'county': 'Norfolk', 'town': 'Sheringham'}, {'county': 'Isle of Shetland', 'town': 'Shetland'}, {'county': 'Shropshire', 'town': 'Shifnal'}, {'county': 'West Yorkshire', 'town': 'Shipley'}, {'county': 'Shropshire', 'town': 'Shrewsbury'}, {'county': 'Kent', 'town': 'Sidcup'}, {'county': 'Devon', 'town': 'Sidmouth'}, {'county': 'Kent', 'town': 'Sittingbourne'}, {'county': 'Lincolnshire', 'town': 'Skegness'}, {'county': 'Lancashire', 'town': 'Skelmersdale'}, {'county': 'North Yorkshire', 'town': 'Skipton'}, {'county': 'Lincolnshire', 'town': 'Sleaford'}, {'county': 'Berkshire', 'town': 'Slough'}, {'county': 'West Midlands', 'town': 'Solihull'}, {'county': 'Surrey', 'town': 'South Croydon'}, {'county': 'West Lothian', 'town': 'South Queensferry'}, {'county': 'Devon', 'town': 'South Molton'}, {'county': 'Somerset', 'town': 'South Petherton'}, {'county': 'Merseyside', 'town': 'South Wirral'}, {'county': 'Middlesex', 'town': 'Southall'}, {'county': 'Warwickshire', 'town': 'Southam'}, {'county': 'Hampshire', 'town': 'Southampton'}, {'county': 'Essex', 'town': 'Southend-on-Sea'}, {'county': 'Essex', 'town': 'Southminster'}, {'county': 'Merseyside', 'town': 'Southport'}, {'county': 'Hampshire', 'town': 'Southsea'}, {'county': 'Nottinghamshire', 'town': 'Southwell'}, {'county': 'North Yorkshire', 'town': 'Sowerby'}, {'county': 'Lincolnshire', 'town': 'Spalding'}, {'county': 'Lincolnshire', 'town': 'Spilsby'}, {'county': 'Hertfordshire', 'town': 'St Albans'}, {'county': 'Fife', 'town': 'St Andrews'}, {'county': 'Clwyd', 'town': 'St Asaph'}, {'county': 'Cornwall', 'town': 'St Austell'}, {'county': 'Carmarthenshire', 'town': 'St Clears'}, {'county': 'Merseyside', 'town': 'St Helens'}, {'county': 'Cornwall', 'town': 'St Ives'}, {'county': 'East Sussex', 'town': 'St Leonards-on-Sea'}, {'county': 'Staffordshire', 'town': 'Stafford'}, {'county': 'Middlesex', 'town': 'Staines'}, {'county': 'Lincolnshire', 'town': 'Stamford'}, {'county': 'Essex', 'town': 'Stanford-le-Hope'}, {'county': 'Middlesex', 'town': 'Stanmore'}, {'county': 'Hertfordshire', 'town': 'Stevenage'}, {'county': 'Stirlingshire', 'town': 'Stirling'}, {'county': 'Cheshire', 'town': 'Stockport'}, {'county': 'Northumberland', 'town': 'Stocksfield'}, {'county': 'Cleveland', 'town': 'Stockton-on-Tees'}, {'county': 'Staffordshire', 'town': 'Stoke-on-Trent'}, {'county': 'Staffordshire', 'town': 'Stone'}, {'county': 'Kincardineshire', 'town': 'Stonehaven'}, {'county': 'Isle of Lewis', 'town': 'Stornoway'}, {'county': 'West Midlands', 'town': 'Stourbridge'}, {'county': 'Hereford & Worcester', 'town': 'Stourport-on-Severn'}, {'county': 'Gloucestershire', 'town': 'Stow-on-the-Wold'}, {'county': 'Suffolk', 'town': 'Stowmarket'}, {'county': 'Wigtownshire', 'town': 'Stranraer'}, {'county': 'Warwickshire', 'town': 'Stratford-upon-Avon'}, {'county': 'Ross-shire', 'town': 'Strathcarron'}, {'county': 'South Lanarkshire', 'town': 'Strathaven'}, {'county': 'Ross-shire', 'town': 'Strathpeffer'}, {'county': 'Somerset', 'town': 'Street'}, {'county': 'Gloucestershire', 'town': 'Stroud'}, {'county': 'Suffolk', 'town': 'Sudbury'}, {'county': 'Middlesex', 'town': 'Sunbury-on-Thames'}, {'county': 'Tyne & Wear', 'town': 'Sunderland'}, {'county': 'Surrey', 'town': 'Surbiton'}, {'county': 'Surrey', 'town': 'Sutton'}, {'county': 'West Midlands', 'town': 'Sutton Coldfield'}, {'county': 'Nottinghamshire', 'town': 'Sutton-in-Ashfield'}, {'county': 'Norfolk', 'town': 'Swaffham'}, {'county': 'Dorset', 'town': 'Swanage'}, {'county': 'Kent', 'town': 'Swanley'}, {'county': 'West Glamorgan', 'town': 'Swansea'}, {'county': 'Wiltshire', 'town': 'Swindon'}, {'county': 'Ross-shire', 'town': 'Tain'}, {'county': 'Gwynedd', 'town': 'Talybont'}, {'county': 'Staffordshire', 'town': 'Tamworth'}, {'county': 'Argyll', 'town': 'Tarbert'}, {'county': 'Cheshire', 'town': 'Tarporley'}, {'county': 'Somerset', 'town': 'Taunton'}, {'county': 'Devon', 'town': 'Tavistock'}, {'county': 'Middlesex', 'town': 'Teddington'}, {'county': 'Devon', 'town': 'Teignmouth'}, {'county': 'Shropshire', 'town': 'Telford'}, {'county': 'Somerset', 'town': 'Temple Cloud'}, {'county': 'Somerset', 'town': 'Templecombe'}, {'county': 'Dyfed', 'town': 'Tenby'}, {'county': 'Gloucestershire', 'town': 'Tewkesbury'}, {'county': 'Oxfordshire', 'town': 'Thame'}, {'county': 'Kent', 'town': 'Thanet'}, {'county': 'Berkshire', 'town': 'Thatcham'}, {'county': 'Norfolk', 'town': 'Thetford'}, {'county': 'North Yorkshire', 'town': 'Thirsk'}, {'county': 'Surrey', 'town': 'Thornton Heath'}, {'county': 'Caithness', 'town': 'Thurso'}, {'county': 'Essex', 'town': 'Tilbury'}, {'county': 'West Midlands', 'town': 'Tipton'}, {'county': 'Devon', 'town': 'Tiverton'}, {'county': 'West Yorkshire', 'town': 'Todmorden'}, {'county': 'Kent', 'town': 'Tonbridge'}, {'county': 'Devon', 'town': 'Torquay'}, {'county': 'Devon', 'town': 'Torrington'}, {'county': 'Isle of Wight', 'town': 'Totland Bay'}, {'county': 'Northamptonshire', 'town': 'Towcester'}, {'county': 'East Lothian', 'town': 'Tranent'}, {'county': 'Gwent', 'town': 'Tredegar'}, {'county': 'Hertfordshire', 'town': 'Tring'}, {'county': 'Wiltshire', 'town': 'Trowbridge'}, {'county': 'Cornwall', 'town': 'Truro'}, {'county': 'Kent', 'town': 'Tunbridge Wells'}, {'county': 'Aberdeenshire', 'town': 'Turriff'}, {'county': 'Middlesex', 'town': 'Twickenham'}, {'county': 'Gwynedd', 'town': 'Tywyn'}, {'county': 'East Sussex', 'town': 'Uckfield'}, {'county': 'Cumbria', 'town': 'Ulverston'}, {'county': 'Devon', 'town': 'Umberleigh'}, {'county': 'Staffordshire', 'town': 'Uttoxeter'}, {'county': 'Middlesex', 'town': 'Uxbridge'}, {'county': 'Isle ofWight', 'town': 'Ventnor'}, {'county': 'Cornwall', 'town': 'Wadebridge'}, {'county': 'West Yorkshire', 'town': 'Wakefield'}, {'county': 'Merseyside', 'town': 'Wallasey'}, {'county': 'Oxfordshire', 'town': 'Wallingford'}, {'county': 'Surrey', 'town': 'Wallington'}, {'county': 'West Midlands', 'town': 'Walsall'}, {'county': 'Norfolk', 'town': 'Walsingham'}, {'county': 'Hertfordshire', 'town': 'Waltham Cross'}, {'county': 'Essex', 'town': 'Walton on the Naze'}, {'county': 'Surrey', 'town': 'Walton-on-Thames'}, {'county': 'Oxfordshire', 'town': 'Wantage'}, {'county': 'Cambridgeshire', 'town': 'Warboys'}, {'county': 'Hertfordshire', 'town': 'Ware'}, {'county': 'Dorset', 'town': 'Wareham'}, {'county': 'West Midlands', 'town': 'Warley'}, {'county': 'Wiltshire', 'town': 'Warminster'}, {'county': 'Cheshire', 'town': 'Warrington'}, {'county': 'Warwickshire', 'town': 'Warwick'}, {'county': 'Warwickshire', 'town': 'Warwickshire'}, {'county': 'Tyne & Wear', 'town': 'Washington'}, {'county': 'Somerset', 'town': 'Watchet'}, {'county': 'Hertfordshire', 'town': 'Watford'}, {'county': 'Somerset', 'town': 'Wedmore'}, {'county': 'Kent', 'town': 'Welling'}, {'county': 'Northamptonshire', 'town': 'Wellingborough'}, {'county': 'Somerset', 'town': 'Wells'}, {'county': 'Norfolk', 'town': 'Wells-next-the-Sea'}, {'county': 'Powys', 'town': 'Welshpool'}, {'county': 'Hertfordshire', 'town': 'Welwyn'}, {'county': 'Hertfordshire', 'town': 'Welwyn Garden City'}, {'county': 'Shropshire', 'town': 'Wem'}, {'county': 'Middlesex', 'town': 'Wembley'}, {'county': 'West Midlands', 'town': 'West Bromwich'}, {'county': 'Surrey', 'town': 'West Byfleet'}, {'county': 'Middlesex', 'town': 'West Drayton'}, {'county': 'North Yorkshire', 'town': 'West Heslerton'}, {'county': 'Ayrshire', 'town': 'West Kilbride'}, {'county': 'Peeblesshire', 'town': 'West Linton'}, {'county': 'Kent', 'town': 'West Malling'}, {'county': 'Kent', 'town': 'West Wickham'}, {'county': 'Wiltshire', 'town': 'Westbury'}, {'county': 'Essex', 'town': 'Westcliff-on-Sea'}, {'county': 'Kent', 'town': 'Westerham'}, {'county': 'Avon', 'town': 'Weston-super-Mare'}, {'county': 'West Yorkshire', 'town': 'Wetherby'}, {'county': 'Surrey', 'town': 'Weybridge'}, {'county': 'Dorset', 'town': 'Weymouth'}, {'county': 'Nottinghamshire', 'town': 'Whatton'}, {'county': 'North Yorkshire', 'town': 'Whitby'}, {'county': 'Hampshire', 'town': 'Whitchurch'}, {'county': 'Shropshire', 'town': 'Whitchurch'}, {'county': 'Cumbria', 'town': 'Whitehaven'}, {'county': 'Dyfed', 'town': 'Whitland'}, {'county': 'Tyne & Wear', 'town': 'Whitley Bay'}, {'county': 'Kent', 'town': 'Whitstable'}, {'county': 'Caithness', 'town': 'Wick'}, {'county': 'Essex', 'town': 'Wickford'}, {'county': 'Lancashire', 'town': 'Wigan'}, {'county': 'Cumbria', 'town': 'Wigton'}, {'county': 'Cheshire', 'town': 'Wilmslow'}, {'county': 'Dorset', 'town': 'Wimborne'}, {'county': 'Somerset', 'town': 'Wincanton'}, {'county': 'Hampshire', 'town': 'Winchester'}, {'county': 'Cumbria', 'town': 'Windermere'}, {'county': 'Berkshire', 'town': 'Windsor'}, {'county': 'Somerset', 'town': 'Winscombe'}, {'county': 'Merseyside', 'town': 'Wirral'}, {'county': 'Cambridgeshire', 'town': 'Wisbech'}, {'county': 'Lanarkshire', 'town': 'Wishaw'}, {'county': 'Buckinghamshire', 'town': 'Witham'}, {'county': 'Essex', 'town': 'Witham'}, {'county': 'Oxfordshire', 'town': 'Witney'}, {'county': 'Surrey', 'town': 'Woking'}, {'county': 'Berkshire', 'town': 'Wokingham'}, {'county': 'West Midlands', 'town': 'Wolverhampton'}, {'county': 'Essex', 'town': 'Woodford Green'}, {'county': 'Hereford & Worcester', 'town': 'Worcester'}, {'county': 'Cumbria', 'town': 'Workington'}, {'county': 'Nottinghamshire', 'town': 'Worksop'}, {'county': 'Herefordshire', 'town': 'Wormbridge'}, {'county': 'West Sussex', 'town': 'Worthing'}, {'county': 'Gloucestershire', 'town': 'Wotton-under-Edge'}, {'county': 'Clwyd', 'town': 'Wrexham'}, {'county': 'Norfolk', 'town': 'Wymondham'}, {'county': 'Surrey', 'town': 'Yateley'}, {'county': 'Devon', 'town': 'Yelverton'}, {'county': 'Somerset', 'town': 'Yeovil'}, {'county': 'North Yorkshire', 'town': 'York'} ]; function flatMap (collection, mappingFn) { const flattened = []; for (const item of collection) { const value = mappingFn(item); if (typeof value[Symbol.iterator] === 'function') { flattened.push(...value); continue; } flattened.push(value); } return flattened; } function prop (key) { return function(obj) { if (obj == null) { return; } return obj[key]; } } const groupedLocations = Map.groupBy(locations, ({town}) => town);
Tests:
Native JS flatMap
Array.from(groupedLocations) .flatMap(([k, v]) => v.length > 1 ? [[k, v.map(({county}) => county)]] : [])
Custom flatMap
flatMap( groupedLocations, ([k, v]) => v.length > 1 ? [[k, v.map(prop('county'))]]: [] )
lodash flatmap
_.flatMap( _.toArray(groupedLocations), ([k, v]) => v.length > 1 ? [[k, _.map(v, 'county')]]: [] )