- Home /
An Array within array
Hello community,
As the title suggests i'm looking for a way to use and array within an array or at least the same principle within javascript.
My problem is that i have an 'item' which comes with 5 values. this item needs to be stored along with these related values, is there such a thing as array within an array? or perhaps another solution for this idea? I could use an array for each value, but somehow i think there is another solution for this, Anyone any suggestions ?
Answer by Kiloblargh · Jun 29, 2013 at 11:29 PM
Yes:
var listOfArrays : List.< Whatever[] > = new List.< Whatever[] >();
Answer by Eric5h5 · Jun 29, 2013 at 11:59 PM
It sounds like you should just use a normal array of a custom Item class.
I could do that, but when i want to call a specific value to i trim the array entry ? like split position X from the array to get the values ? is that the best way ?
I doubt it, but then I'm not entirely clear what you're actually trying to do.
Your answer
Follow this Question
Related Questions
A node in a childnode? 1 Answer
UnityScript for unique simpleJSON lists 0 Answers
List problem? 2 Answers
Accessing variable of instantiated prefab inside array in javascript 1 Answer
Never repeat last random audioclip 2 Answers