07-24-2023, 07:32 AM
I try to create the following structure:
colItems = new Array;
colItems[0] = new Object;
colItems[0].name = "Name";
colItems[0].title = "Title";
colItems[0].path = "Path";
All data there is pre-defined. I wonder if there is any other way to code it in a more compact and readable way, like this:
colItems = new Array(
1 => {
name => "Name";
title => "Title"
....
},
)
colItems = new Array;
colItems[0] = new Object;
colItems[0].name = "Name";
colItems[0].title = "Title";
colItems[0].path = "Path";
All data there is pre-defined. I wonder if there is any other way to code it in a more compact and readable way, like this:
colItems = new Array(
1 => {
name => "Name";
title => "Title"
....
},
)