I am a beginner in javascript and I find arrays and objects to be a bit challenging. Currently, I am facing a hurdle with them.
Here is the array I'm working with:
[ '5', '13', '16', '22', '24' ]
1st <-- code for this
I am attempting to create a structure similar to the one below:
[null,{
"0": 5,
"1": "FFFRRR",
"tx": 0,
"ty": 0,
"tz": 0,
"rx": 0,
"ry": 0,
"rz": 0
},
{
"0": 13,
"1": "FFFRRR",
"tx": 0,
"ty": 0,
"tz": 0,
"rx": 0,
"ry": 0,
"rz": 0
},
{
"0": 16,
"1": "FFFRRR",
"tx": 0,
"ty": 0,
"tz": 0,
"rx": 0,
"ry": 0,
"rz": 0
},
{
"0": 22,
"1": "FFFRRR",
"tx": 0,
"ty": 0,
"tz": 0,
"rx": 0,
"ry": 0,
"rz": 0
},
{
"0": 24,
"1": "FFFRRR",
"tx": 0,
"ty": 0,
"tz": 0,
"rx": 0,
"ry": 0,
"rz": 0
}]
Appreciate any help provided. Thank you.