I have an object array for customization of colors on my website. It gets generated like this when the colors are selected by the user:
colours = {
"a":["red", "green", "blue"],
"b":["pink", "yellow", "red"],
"c":["violet", "black"],
//and lots more
}
What I am trying to achieve is to connect (this will vary) the value of a with d and c with x. What ever the change is done in the values of a should be the values of d. I have multiple pages like this where I have to connect different values. How can I do this is it possible? It would be nice if I could set it on the header of every page like this a=d or colours[a] = colours[d].
Ok i found a way, I am not sure if this is the right approach for it.
On my main html page header I made another object like this:
Then in my coding page:
That solved the problem. Thank you all for helping and I wish this will be helpful for some one.