1

below is the data that i get using facebook graph api. this array string i processed into the kendoui multiselect script.all data that shows below i get there in kenodo html template. But when i retrieve location using data.location.name it gives undefined data.location in browser's console. Please help me if any one have idea.

{
   "data": [
      {
         "name": "freind name: XXXX",
         "location": {
            "id": "friend location id : XXXXX",
            "name": "Bridgewater, New Jersey"
         },
         "id": "friend id : XXXXX",
         "picture": {
            "data": {
               "url": "profile pic url here : XXXX",
               "is_silhouette": true
            }
         }
      } ]
    }



jQuery("#customers").kendoMultiSelect({
                        dataTextField: "name",
                        dataValueField: "id",


                        minLength:3,
                        // define custom template
                        itemTemplate: '<img src=\"http://localhost/magento/media/facebook_icon.png\" width=\"20px\" height=\"18px\" />'+
                        '<img src=\"${data.picture.data.url}\" width=\"70\" height=\"80\" />'+
                        '<h4>${ data.name }</h4>'+
                        '<h5>${ data.location.name }</h5>',


                        tagTemplate:  '<img src=\"http://localhost/magento/media/facebook_icon.png\" width=\"20px\" height=\"18px\" />' +
                        '<img class="tag-image" src=\"${data.picture.data.url}\" />' +
                                      '#: data.name #',           

                                    dataSource : data,
                        change: onSelectChange,         
                                    height: 300
                    });
4

0 回答 0