I have one problem. Anyone help me out. I am new to React so I am not able to debug it.
The problem is
When I print this.props.colors i.e.
console.log(this.props.colors)
I got below result.
{"colors": [["Red", true], ["Blue", false], ["Green", true], ["Black", true], ["White", false]]}
But I want it below form
0: (2) ["Red", true]
1: (2) ["Blue", false]
2: (2) ["Green", true]
3: (2) ["Black", true]
4: (2) ["White", false]
How can I get this? Anyone help me out.
Thank you.
this.props.colors.colors?undefined. I tried it as followsconsole.log(this.props.color.colors)prints{"colors": [["Red", true], ["Blue", false], ["Green", true], ["Black", true], [White", false]]}butconsole.log(this.props.color.colors ? this.props.color.colors.colors : '1111111' )printsundefinedDid I miss something?