I am looking to reference the total-fees property of an object:
In react, the '-' causes problems in referencing this property. I have tried using camelCase, and quotations marks, but no luck.
CodePudding user response:
Got it :D
data.row.original['total-fees']
CodePudding user response:
You are using negate symbol(!) with the key, data.row.original.total-fees
. What this means is that your return statement will run only when data.row.original.total-fees
is false or 0, but it is actually null.
So, what you can try is:
1). console.log(data.row.original.total-fees); //output: null
2). if(data.row.original.total-fees===null) return "Response";