javascript - Display ng-grid with nested array of JSON objects? -


i have json data looks so:

return {     "activitytypes" :[{         "id" :"",         "name:" :"",         "icon" : "",         "partial": "",         "label" : {             "id": "",             "name": ""         }     }],     "apikey" : "",     "approveby": 0,     "approvers" : [],      "cansendto" : [{         "id" : "",         "name" : ""     }],       "creators" : [],     "isactive" : false,     "notification" : false,      "sourceid": "",     "sourcename":"" }; 

i trying use ng-grid, trouble trying access elements inside array of objects, such activitytypes or cansendto arrays. in following example, tried display cansendto's id. i've tried following not render on screen. ideas on how fix this? thanks!

{field: 'cansendto.id', displayname: 'can send to', width:'10%',     celltemplate: '<div class="ngcelltext", style="white-space: normal;">{{row.getproperty(col.field)}}</div>'}, 

i don't know ng-grid, straight javascript perspective should cansendto[0].id, since cansendto 1 element array.


Comments

Popular posts from this blog

php - SPIP: From Tag directly to an article -

jquery - isAjaxRequest always return false -

ruby on rails - In a controller spec, how to find a specific tag in the generated view? -