title: Binding and accessing nested elements using Rivets.js and Backbone deep model
body: <p>We are using an open source FormBuilder client side component and extending it to fit our requirements. Formbuilder is written using <code>Backbone Deep model</code> with nested data and for binding, it use Rivets.js.</p>
  
  <p>Here Formbuilder is on GitHub: <a href="https://github.com/dobtco/formbuilder" rel="nofollow noreferrer">https://github.com/dobtco/formbuilder</a> and here <code>backbone deep model</code> at GitHub: <a href="https://github.com/powmedia/backbone-deep-model" rel="nofollow noreferrer">https://github.com/powmedia/backbone-deep-model</a></p>
  
  <p>Now we are using nested elements in view, which are nested in structure as in following JSON:</p>
  
  <pre><code>{
      "fields": [{
          "label": "Untitled",
          "field_type": "checkboxes",
          "required": true,
          "field_options": {
              "options": [{
                  "label": "test",
                  "checked": false
              }, {
                  "label": "",
                  "checked": false
              }]
          },
          "rules_data": {
              "rules": [{
                  "ruleId": "rule6",
                  "criterias": [{
                      "condition": "if",
                      "responseTo": "",
                      "userOption": ""
                  }],
                  "branchTo": [{
                      "branch": "test"
                  }, {
                      "branch": ""
                  }, {
                      "branch": ""
                  }]
              }]
          },
          "cid": "c2"
      }]
  }
  </code></pre>
  
  <p>Here there is array of rules, then rules have at every index have more data with in which one is branchTo, now branchTo is also an indexed array. In Rivets.js we can bind something using Rivets.js <code>.</code> or <code>:</code> operator. In case of properties, we can use <code>:</code> but we are unable to access elements inside nested indexed array.</p>
  
  <p>So is it possible to access and bind elements in Rivets while using nexted indexed elements? If yes, then how can we do so? Or is there better and simpler way to accomplish same goal? I am beginner in Backbone as well as Rivets, and I am not sure if this is the right way.</p>