0

can any one help me out as I'm new to rivets.js. I have a issue with accessing JSON response in my html page. I'm able to access till 'subTotal' key with account.subTotal, but not able to access currency (inner keys) etc. Below is the JSON response I have:

[
{
    "subTotal": [
        {
            "currency": "dollar",
            "balance": "979,18"
        }]
    ,
    "productList": [
        {
            "acctno": "123456789",
            "Name": "abc",

        }
    ]
},
{
    "subTotal": [
        {
            "currency": "dollar",
            "balance": "979,18"
        }]
    ,
    "productList": [
        {
            "acctno": "123456789",
            "Name": "abc",

        }
    ]
},
{
    "subTotal": [
        {
            "currency": "dollar",
            "balance": "979,18"
        }]
    ,
    "productList": [
        {
            "acctno": "123456789",
            "Name": "abc",

        }
    ]
}

]

Below is how I'm appending in HTML template:

<ul>
<li data-each-account="model">
    <a href="#">
    <strong data-text="account.subTotal.currency"></strong><br/>
    </a>
    </li>
</ul>                       

Thanks in advance !

  • Possible duplication of: [How to bind deeper than on level with rivets js](http://stackoverflow.com/questions/12868566/how-to-bind-deeper-than-one-level-with-rivets-js) – dc5 Jun 05 '13 at 22:24

1 Answers1

0
data-text="account.subTotal || attr currency">