title: How can I display a child div inside a v-for loop in vuejs
body: <p>I have an array nested inside of an array and I loop through them using two v-for loops. When I click on a button I want it to display the div in the second loop only (the div for which I clicked my button). I'm kinda having trouble explaining it with words so I uploaded it to jsFiddle: <a href="https://jsfiddle.net/h8L6zegc/1/" rel="nofollow noreferrer">https://jsfiddle.net/h8L6zegc/1/</a></p>
  <pre class="lang-html prettyprint-override"><code>&lt;template&gt; 
  &lt;div id=&quot;app&quot;&gt;
    &lt;h1&gt;my Orders&lt;/h1&gt;
    &lt;div v-for=&quot;(orders, index) in SubmittedOrders&quot; :key=&quot;index&quot;&gt;
      &lt;h3&gt;#2222&lt;/h3&gt;
      &lt;h4&gt;170$&lt;/h4&gt;
      &lt;button @click=&quot;openModal(orders)&quot;&gt;order details&lt;/button&gt;
      &lt;hr&gt;
      &lt;br&gt;
      &lt;div v-show=&quot;Showmodal&quot;&gt;
        &lt;div v-for=&quot;order in orders&quot; :key=&quot;order.id&quot;&gt;
          &lt;h3&gt;{{ order.orderName }}&lt;/h3&gt;
          &lt;h3&gt;{{ order.price * order.quantity }}&lt;/h3&gt;
        &lt;/div&gt;
        &lt;hr&gt;
        &lt;h3&gt;#2222&lt;/h3&gt;
        &lt;h4&gt;170$&lt;/h4&gt;
        &lt;button @click=&quot;closeModal(orders)&quot;&gt;close Modal&lt;/button&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/div&gt;
  
  &lt;/template&gt;
  </code></pre>
  <pre class="lang-html prettyprint-override"><code>&lt;script&gt;
  
   data() {
      return {
        SubmittedOrders: [
          [{
              orderName: 'Nissan',
              price: 50,
              quantity: 1,
            },
            {
              orderName: 'ferrari',
              price: 120,
              quantity: 2,
            },
          ],
          [{
              orderName: 'porch',
              price: 90,
              quantity: 1,
            },
            {
              orderName: 'Mercedez',
              price: 180,
              quantity: 4,
            },
          ],
        ],
        Showmodal: false,
      };
    },
    methods: {
      openModal(orders) {
        console.log(orders);
        this.Showmodal = true;
      },
      closeModal(orders) {
        this.Showmodal = false;
      }
    }
  
  &lt;/script&gt;
  
  </code></pre>