How to access a separate object inside createdRow
How to access a separate object inside createdRow
I hope what I'm trying to do makes sense. I couldn't easily mock it up with a test case, but hopefully this makes sense. I have essentially the following json that gets returned to my DataTables instance. First, the state of the individual user, then a list of states.
{
"user_state": "CA",
"states": [{
"abbr": "CA",
"name": "California",
},
{
"abbr": "NY",
"name": "New York",
}]
}
It's easy enough to put the states in the DataTable instance. However, I'd like to change the class to highlight the row with the state that belongs to the user. I figured an if clause inside createdRow would work, but since I'm using "sAjaxDataProp" to point to "states" I can't figure out how to access "user_state". Any ideas?