I'm using rails 3.2 with knockout.js and ko.mapping. I'm able to map from my json data and create my viewModel from that, in js console I can view the tree of data fine. In my view I'm using form_for with fields for to render my view. What I can't figure out is how to do a data-binding on my inputs inside the fields_for without having to use KO foreach or with. The structure of my json looks like this.
{
"ss_sections": [
{
"ss_lines": [
{
"ss_line_cells": [
{
"cell_name": "credits",
"cell_value": "124795.00",
},
]
}
]
}
]
}
How would I go about writing out my data-bind attribute on my input to directly point to the cell_value without using knockout.js looping since my fields_for is already looping through my elements?