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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T15:06:14+00:00 2026-05-25T15:06:14+00:00

If I have an observable array in my view model I can access individual

  • 0

If I have an observable array in my view model I can access individual items in that array using the item’s position within my script:

alert(this.travellers()[0].Age);

However, I cant seem to databind to the item/property using similar syntax in my view:

<label data-bind="text: travellers()[0].Age" />

Again, I’m sure I’m missing something fundamental.

  • 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-25T15:06:15+00:00Added an answer on May 25, 2026 at 3:06 pm

    Your syntax is correct, it just depends on where you are doing the binding to tell whether travellers is available at that level.

    If you are inside of a template, then you would want to consider passing this value in via templateOptions or if your viewModel has global scope you could reference it like text: yourViewModel.travellers()[0].Age.

    Sample with each option: http://jsfiddle.net/rniemeyer/brAtZ/

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

Sidebar

Related Questions

I have a observable collection exposed as a property within a view model. The
I have a listbox bound to a view model observable collection: This works fine,
I have a an array of observable collections and I want to display all
I'm stumped here. I have an observable collection that holds business objects. I have
I have made a generic Observer interface and an Observable class, but can't compile
I have this problem when i try to synchronize a observable list with listbox/view
I have a observable collection of viewmodel objects. How can I subscribe to the
I have my class that has an internal observable collection. I want to pass
I have the following bit of code that modifies an observable collection of 'screens'
What is the best way to handle an observable array which can be committed/thrown

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.