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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T09:57:09+00:00 2026-06-15T09:57:09+00:00

Here is example . I simplified it as much as i could, but i

  • 0

Here is example.
I simplified it as much as i could, but i still can’t understand where i’m wrong.
Please help me ))

P.S stackoverflow require a code, not just link to jsfiddle, so this is it:
html:

<form action="" method="GET" data-bind="FacebookContacts">
    <table class="importContacts table import">
        <thead>
            <tr>
                <td></td>
                <td>Photo</td>
                <td>Name</td>
                <td>Login</td>
            </tr>
        </thead>
        <tbody data-bind="foreach: contacts">
            <tr>
                <td>
                    <span data-bind="text:FullName"></span>
                </td>
                <td>

                </td>
                <td>

                </td>
                <td>

                </td>
            </tr>
        </tbody>
    </table>
</form>​

javascript:

var FacebookContactsViewModel = function () {
        var _self = this;
        _self.FacebookContacts = ko.observable();
        _self.GetData = function() {
            var localData=ko.mapping.fromJS(JSON.parse(contacts));
            _self.FacebookContacts(localData);
            ko.applyBindings(_self);
        };
    _self.GetData();
};
var contacts='{"contacts":[{"FullName":"Petr Perelygin"}]}';
var vm = new FacebookContactsViewModel();​
  • 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-15T09:57:10+00:00Added an answer on June 15, 2026 at 9:57 am

    Take a look at here and make your code more simpler and easier to read:

    http://jsfiddle.net/NpK3K/24/

    The problem was that you are putting an object into the "FacebookContacts" property and not an Array. So you should use the "with" binding extension at the first place for root element to change the datacontext for nested elements.

    Hope it helps.

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

Sidebar

Related Questions

I'm pretty sure I'm doing something wrong, but I've simplified my example as much
I've simplified my example here massively, so please excuse it if it looks to
Here's a simplified example of an object I have. What I would like to
I cannot find the solution for this problem, here is the simplified example: On
I look at example of dropdown menu here . Here is simplified jsfiddle example.
Example here: http://jezebel.com/5896408/racist-hunger-games-fans-dont-care-how-much-money-the-movie-made Click on the 3x3 Tweets screencap they have up. I love
I hit this issue regularly but here is an example.... I have a Order
I am looking to create a report of menu items. Here's a simplified example
I'll give a simplified example here. Suppose I have an iterator in python, and
I'm trying to optimize database queries for a Django app. Here's a simplified example:

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.