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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T14:19:55+00:00 2026-06-17T14:19:55+00:00

[{username : 11}, {password : test}, {detailorder : [ {id : 1, qty :

  • 0
[{"username" : "11"},
      {"password" : "test"},
      {"detailorder" : [
        {"id" : "1",
         "qty" : "5"},
        {"id" : "2",
         "qty" : "10"}
      ]}
    ]

How di I create above json in javascript? I have very low understanding in json. I reffered to How do i build JSON dynamically in javascript?. I need to add data dinamically especially for detailorder. But I’ stuck from beginning.

I wrote

var datajson = [];

And i dont know how to what to write next. Sorry for my bad english. Thanks

  • 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-17T14:19:56+00:00Added an answer on June 17, 2026 at 2:19 pm

    do you mean like:

    var datajson = [
        { "username" : 11 },
        {"password" : "test"},
        {"orderdetail" : 
            { 
                "id": 1,
                "qty": 25           
            },
            { 
                "id": 2,
                "qty": 10           
            }
        }
    ];
    

    Added:

    var datajson = {};
    datajson.username = 11;
    datajson.password = "test";
    datajson.detilpesanan = [];
    datajson.detilpesanan.push({});
    datajson.detilpesanan.unshift({});
    datajson.detilpesanan[0]["id"] = 1;
    datajson.detilpesanan[0]["jumlah"] = 5;
    datajson.detilpesanan[1]["id"] = 2;
    datajson.detilpesanan[1]["jumlah"] = 10;
    
    console.log( datajson );
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have open port url 192.168.1.9 and its username : test and password: test
I have code to check username and password in test.php file. But when I
I have the following code snippet to test a plain-text username/password against the AD,
Please log into my website using: username: test password: test and then go to
I'm trying to execute the following line: exit | sqlplus username/password@sid @test.sql Works great
from django.contrib.auth.models import User u = User.objects.get(username='test') user.password u'sha1$c6755$66fc32b05c2be8acc9f75eac3d87d3a88f513802 Is reversing this password encryption
I use this code to authenticate to my WCF Service: proxy.ClientCredentials.UserName.UserName = test; proxy.ClientCredentials.UserName.Password
I have a website that uses Basic Authentication (username/password). Why is the following code
Say I have a user domain class with fields username and password . For
I have two table in my database. 1) User Table id username password logo

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.