Creating a tech tree

Hello!
For a project i’m working on, i need a tech tree. I have already set up the tree, but now it comes down to the scripting of it, for wich i have no clue on what to do and what would be most efficient if it comes to memory useage, speed and accessability.

My current idea is to have a array like this: {(All the upgrades) {(Up.1)UpNumber,cost,{requirements},{unlocks}},{(Up.2. same as setup up1)}}.
And it will also need an array to save all of the unlocked stuff.
Obviously, this is not very accessable from my side, nor will it be very efficient.

So my question is, how do i best set it up?

Thanks for reading.

i just did what i wrote above and it works.