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

  • Home
  • SEARCH
  • 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 7415375
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T07:17:29+00:00 2026-05-29T07:17:29+00:00

I have a JSON structure containing arrays of arrays. I have a View Model

  • 0

I have a JSON structure containing arrays of arrays. I have a View Model that defines objects with Observable Arrays containing Observable data, and then nesting those objects in other Arrays and Observables.

What is the simplest way to load a View Model containing nested Observable Arrays containing Observable data?

Example:
http://jsfiddle.net/uyQb6/1/

  • 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-05-29T07:17:32+00:00Added an answer on May 29, 2026 at 7:17 am

    You could explore using the mapping plugin, but the options object would get complicated as each create callback would have to call the mapping plugin again and then add any dependentObservables and it would be easier to make all of the properties observables.

    You can stick with your constructors though and use something like ko.utils.arrayMap, which is just a simple function that loops through an array and remaps each item to whatever you return from the function that you supply.

    Here is your sample with the ko.utils.arrayMap calls added:
    http://jsfiddle.net/rniemeyer/VUfSS/

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

Sidebar

Related Questions

I have a JSON-like data structure (which I don't want to change) that is
I'm new to the GSON library, I have a json data structure that looks
I have a set of data in one JSON structure: [[task1, 10, 99], [task2,
I have folder structure and I would like to create JSON objects based on
I have some data and need to create a json file with this structure
I have JSON string that has nested objects with dynamic names that vary each
I have a json object that is actually an arraylist of objects previously converted
I have view that contains a table with the following structure: <table id=mappings> <thead>
I have a json structure that I'm decoding that looks like this: person =>
I have this XML structure that I wish to construct in JSON format 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.