0
votes

I am using the Jquery token input, but I am getting the Uncaught TypeError: Cannot read property 'toLowerCase' of null

I am not understanding why I am getting this error, because its working with other data. I have written the following the code in Coffeescript:

$('#field_name').tokenInput data, propertyToSearch: 'case_no'

The data is nothing but

data = [{id: 12, case_no: 'abc'}, {id: 10, case_no: 'ss'}.......]

The data contains the 76000 records, I am not understanding why I getting this error, what is the problem with above code or data?

1

1 Answers

0
votes

I dont think JSON will accept a property named case_no without quotes (the underscore is a special character), did you try reformat your data as follows:

data = [{id: 12, 'case_no': 'abc'}, {id: 10, 'case_no': 'ss'}.......]