Change Search result view of uib-typeahead

164 Views Asked by At

What I am trying to do is similar to this but I want in group that all cities of a state should come under that state heading. I have to use Uib-typeahead only. Refer link below.

https://codepen.io/joe-watkins/pen/EagEWv

The sample json is like

[
{
    "id": "1",
    "name": "Mumbai",
    "state": "Maharashtra"
},
{
    "id": "2",
    "name": "Delhi",
    "state": "Delhi"
},
{
    "id": "3",
    "name": "Bengaluru",
    "state": "Karnataka"
},
{
    "id": "4",
    "name": "Pune",
    "state": "Maharashtra"
},
{
    "id": "5",
    "name": "Nagpur",
    "state": "Maharashtra"
}
 ]

The output should be like

State should be in Bold

 **Maharashtra**         **Delhi**          **Karnataka**
 Pune                      Delhi              Bengaluru
 Mumbai
 Nagpur
0

There are 0 best solutions below