vue js object.keys to int code example

Example 1: vue v-for loop array

<script src="https://cdn.jsdelivr.net/vue/latest/vue.js"></script>
<div id="sample">
  <div v-if = "private.folders!=null" v-for="folder in private.folders">
  {{folder.name}}
      <div v-for="check in folder.checks">
          {{check.name}}
      </div>
  </div>
</div>

Example 2: vue js set array value by key

// Doing like this will only update the data
// But will not reactive to the DOM
this.items[index] = val;

// In order to make it reactive to the DOM
// Do it like this
this.$set(this.items, index, val)