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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T14:43:40+00:00 2026-06-05T14:43:40+00:00

I am generating 2 json object by using the java script mentioned below.I am

  • 0

I am generating 2 json object by using the java script mentioned below.I am populating my json to the form fields, now the problem is I can display only one at a time, how to display the other json in a form at the same time?

//first json :

{"vIRnumber":"195412","dReceivedDate":"2012-06-06","vDescription":"GP Coils","fThickness":"888","fWidth":"4566","fQuantity":"122","vStatus":"work in progress"}

//second json:

{"vIRnumber":"45","dReceivedDate":"2012-04-26","dDate":"0000-00-00","dStartDate":null,"nPartyName":"Aasha","vDescription":"MS Channels","fThickness":"1.8","fWidth":"1220","fQuantity":"34523"} 

        //**i am filling the fields using the javascript below:**

        var json =<?php echo($data); ?>;
        for(key in json)
        {
          if(json.hasOwnProperty(key))
            $('input[name='+key+']').val(json[key]);
    }
  • 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-05T14:43:41+00:00Added an answer on June 5, 2026 at 2:43 pm

    For displaying the first json you could add the values next to the form item for example

    <label for="form-item-staddress">St.Adress</label>
    <input id="form-item-stadress" type="text" name="stadress"/>
    <div class="default">Default value from first json</div> 
    

    Load the first json in the div for displaying current value

    For passing/saving the two json for submitting the form or processing other stuff you could try

    <input type="hidden" id="firstJSON" value="FirstJSON"/>
    <input type="hidden" id="seondJSON" value="SecondJSON"/>
    

    or use 2 forms the first with the values of the first json, but can’t be edited/submitted only for viewing/reference and 2nd form for editing/submitting.
    You can try to do more like
    comparison for changes

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

Sidebar

Related Questions

I'm successfully generating a JSON object using Django Serialization. I do so with this
I'm using mustache. I'm generating a list of notifications. A notification JSON object looks
I am generating the html using JSON file. Now I need to pass data
Performance issue, when generating around 800~ options from jSon object via javascript. Any suggestion,
I have written java code for generating json of my searched data from file.But
I'm using GraniteDS Actionscript code generation templates that let's me take a Java object
I'm using @ResponseBody to get the json to Browser.I could get the data,but now
I'm generating JSON from a javascript object. But I do not need all attributes
When manually generating a JSON object or array, it's often easier to leave a
I'm calling a php script (getNum.php) via ajax after creating an object and using

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.