Open ChinmayDeyUI opened 4 years ago
you must include Name key to your Json. sorry for my bad english
it look like : [{"Id":1,"Name":"Whatever"}]
@ChinmayDeyUI You json is incorrect please use map function to convert json:
var data = json.map((item) => {
// item values can change, but no Id, Name, Value
return {
Id: item.Id,
Name: item.city,
Value: item.type,
};
});
After I added your package in my project I got below error. TypeError: undefined is not an object (evaluating 'l.Name.toLocaleLowerCase')
When I used your top20.json it works, but if I used my own json I got above error. Your json is like [{"Name": "Åland Islands","Value": "Åland Islands","Code": "AX","Id": 1 }] and my json is like [{"id":1,"city":"Kolkata","type":"Metro","city_class":"A","state":"West Bengal","state_id":2,"type_id":"M"}]