I am using the select2 for on of my search boxes. I\'m getting the results from my URL but I\'m not able to select an option from it. I want to use the \'product.productName
I have faced the same issue,other solution for this issue is:-
In your response object(In above response Product details object) must have an "id" as key and value for that.
Example:- Your above given response object must be like this
{"id":"1","productName":"samsung galaxy s3","manufacturer":"Samsung","productOptions":"Color;Memory","productOptiondesc":"Silver;32GB"}
SO you don't need this id: function(object){return object.key;}