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 7932091
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T20:54:41+00:00 2026-06-03T20:54:41+00:00

Javascript array needs to replace the static values inside the square brackets[] and curly

  • 0

Javascript array needs to replace the static values inside the square brackets[] and curly Brackets {}

console.log(my_array[0]); // This returns  x: 201.5,y: 136.5,z: 0

$('#superdiv').addSpice(function(super){
return $(document.createElement('span')).addClass('note').html(super.z);},              
[  {x: 0.3875, y: 0.3246, z: 4},  //Should be Array Value1
    {x: 0.57, y: 0.329, z: 2}     //Should be Array Value2
 ]);}

Right now everything inside the [] is static … I have an array that has several values like the following and I want to fill the values into same manner … but with the array my_array[0]=”x: 0.3875, y: 0.3246, z: 4″; my_array[1]=”x: 0.57, y: 0.329, z: 2″;

  • 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-03T20:54:43+00:00Added an answer on June 3, 2026 at 8:54 pm
    $('#superdiv').addSpice(function(super){
       return $(document.createElement('span')).addClass('note').html(super.z);},          
        [  {x: my_array[0].x, y: my_array[0].y, z: my_array[0].z},  //Should be Array Value1
           {x: my_array[1].x, y: my_array[1].y, z: my_array[1].z}     //Should be Array Value2
        ]);}
    ...
    

    Something like that ?

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

Sidebar

Related Questions

I am trying to use JavaScript to dynamically replace content inside of curly braces.
1) I have this Javascript array: lang=new Array(); lang[sq]=Albanian; lang[ar]=Arabic; lang[en]=English; lang[ro]=Romanian; lang[ru]=Russian; 2)
I'm using a the .replace() method in javascript to convert a serialized array of
I'm using a javascript associative array (arr) and am using this method to loop
I've referred to this post: Post array of multiple checkbox values And this jQuery
I know that I can create a javascript replace like this: str = str.replace(/mytarget/g,
I have an array in javascript that I need to join and send through
I need to return an array in php and use it in javascript. When
Working with regular javascript, I need to store info into an array for output
I have a simple JavaScript Array object containing a few numbers. [267, 306, 108]

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.