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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T09:39:30+00:00 2026-06-07T09:39:30+00:00

I have two JSON objects with the same structure that I want to visualize

  • 0

I have two JSON objects with the same structure that I want to visualize on my html page side-by-side. Since I’m building a comparison of sorts, I want data elements that match to be viewed on the same line. Left-only or right-only data elements need to be shown with blanks next to them in the opposite column.

I’m trying to do this with JsRender/JsViews, but it is difficult to handle multiple data sources at once. Or doing each side as a separate template, each side doesn’t know where to load data since it would need to know if the opposite existed.

I’m up for using any other mechanism as long as it works.

Thanks,
Greg

  • 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-07T09:39:32+00:00Added an answer on June 7, 2026 at 9:39 am

    You can pass in additional data objects to JsRender templates, via the contextual helpers, either by passing in as context on the render call:

    render(dataOne, {data2: dataTwo})
    

    or by registering as helpers:

    $.views.helpers({
        data2: dataTwo
    })
    

    Either way, you can then access the helper object as ~data2, for example by writing {{:~data2.prop}} or {{for ~data2}}...{{/for}}.

    Of course, dataOne or dataTwo can be either objects or arrays.

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

Sidebar

Related Questions

I have two JSON objects with the same structure and I want to concat
I want to break down a JSON string into smaller objects. I have two
how can i turn this JSON to a list of objects that have two
I Have two problem in this Case : I want to pass a JSON
I want to save Json into two variables so that I can manipulate one,
I need to do operations like compare that two number arrays have the same
I have two JSON objects in Javascript, identical except for the numerical values. It
I have two arrays in JSON something like: proj1 proj1 taska taska charge1 charge1
I have a two dimensional JSON array where each element contains several attributes. The
I have two WCF services Exchange1.svc and Exchange2.svc both setup to be RESTful JSON

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.