I have the following array.
[{
'firstname': 'John',
'surname': 'Smith',
'HouseNo': 'firtree farm'
}, {
'firstname': 'Paul',
'surname': 'Smith',
'HouseNo': 'firtree farm'
}, {
'firstname': 'John',
'surname': 'Smith',
'HouseNo': 'firtreefarm'
}, {
'firstname': 'John',
'surname': 'Smith',
'HouseNo': 'firtree farmhouse'
}, {
'firstname': 'Paul',
'surname': 'Smith',
'HouseNo': 'firtree farmhouse'
}, {
'firstname': 'Paul',
'surname': 'Smith',
'HouseNo': 'FirTree farmhouse'
}]
I need to produce another array that contains no duplicates of element 'HouseNo' and just the element 'HouseNo. Also it need to be case insensitive.
ie.
[{
'HouseNo': 'firtree farm'
}, {
'HouseNo': 'firtreefarm'
}, {
'HouseNo': 'firtree farmhouse'
}, {
'HouseNo': 'FirTree farmhouse'
}]
The application is a returned set of address's based on a postcode search. I can then offer a filtered list of unique houseNo's they can choose form.
MrWarby