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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T11:31:06+00:00 2026-06-08T11:31:06+00:00

I have Knockout.js view model that has nested observable arrays. function ParentVM(data) { var

  • 0

I have Knockout.js view model that has nested observable arrays.

   function ParentVM(data) {
        var self = this;

        self.childs= ko.observableArray([]);
        ko.mapping.fromJS(data, mapping, this);
    }

    function ChildVM(data) {
        var self = this;

        self.propertyA = ko.observableArray([]);
        self.propertyB = ko.observable();

        ko.mapping.fromJS(data, mapping, this);
    }

    function GrandChildVM(data) {
        var self = this;

        self.propertyX = ko.observable();
        self.propertyY = ko.observable();
        self.propertyZ = ko.observable();

        ko.mapping.fromJS(data, mapping, this);
    }

I have following bindings:

 data-bind="value: propertyX, valueUpdate: 'keydown'"

Now, how can I add event handler to call my REST endpoint to update view model state when these properties changes?

  • 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-08T11:31:07+00:00Added an answer on June 8, 2026 at 11:31 am

    If I understand you correctly, this is what you can do:

    function ChildVM(data) {
        var self = this;
    
        self.propertyA = ko.observableArray([]);
        self.propertyB = ko.observable();
    
        ko.mapping.fromJS(data, mapping, this);
    
        self.propertyA.subscribe(function (newValue) { /* call you're api with new value! */ });
        self.propertyB.subscribe(function (newValue) { /* call you're api with new value! */ });
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a Knockout.js view model that looks like this: UserName:null, FirstName:null, LastName:null, Countries:{
If I have a view model that looks like this when using the knockout
I have an MVC view model that looks like this: public class DirectorySearchModel {
I have a Knockout observable array that I wish to edit from within Javascript
I have a knockout model that is feeding my page and on a save
hi i have a model in knockout holded by a variable : var knockoutObject
I have the following table template that is rendered through knockout: <table class=gv data-bind=visible:
I have the following view model which contains an array of elements function ReservationsViewModel()
js and the knockout mapping plugin my problem is this: i have model and
I have a big problem with using Knockout JS. In my view model I

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.