Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8331579
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T02:27:26+00:00 2026-06-09T02:27:26+00:00

I have an object array for customization of colors on my website. It gets

  • 0

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].

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T02:27:27+00:00Added an answer on June 9, 2026 at 2:27 am

    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:

     connections = {'a':'d', 'c':'x'};
     // the key to be connected : the key to connect to
    

    Then in my coding page:

     for (ax in connections) {
     // this will create a loop through connections object
        var ay = connections[ax];
        colours[ay] = colours[ax];
     // this will make a and d, c and x equal in colours.
    

    That solved the problem. Thank you all for helping and I wish this will be helpful for some one.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have converted an array to object data like this: <?php $myobject->data = (object)Array('zero','one','two');
I have an array that looks like this: [ Object actions: Array[2] comments: Object
I have array object in jquery. array=[]; array{Id:user.Id,Date:user.Date}; Now am going to pass this
This may be hard to explain, but I have array object like this: myobject
If I have an object array like this... var p = [{ 'first': 'John',
for example say i have an object array called $list looks like this: <(stdClass)#16
I have this object/array thing: var states = {}; states[CA] = new State(CA, California);
I have an object array $this->result When I echo $this->result I get Array .
I have this object of class Array >> answers_to_problem => [#<Answer id: 807, problem_id:
For example I have this array object: Object [object HTMLDivElement],[object HTMLDivElement],[object HTMLDivElement],[object HTMLDivElement] and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.