i had a scenario to bind nested and array of json to bind ag-grid using angular 5. i tried using valueGetter on my colDefs row data as Json to bind. nothing seems to be worked out. I see no examples with documentation as well.
Here is the json and code i had till now.
Json :
{
"packages": [
{
"packageId": 2,
"name": "Name1",
"isEnabled": true,
"packageRegistrationTypes": [
{
"registrationType": {
"registrationTypeId": 1,
"description": "Reg1"
},
"isActive": true
},
{
"registrationType": {
"registrationTypeId": 45,
"description": "Reg2"
},
"isActive": false
}
]
}
]
}
Angular 5 :Coldef
{headerName: 'Package Name',checkboxSelection: true,rowGroupIndex: 0, valueGetter: params => params.data.packages[0].name},
Row values i am binding from Service, but failed to get it. should i use any different format for binding nested values and array values.