screen_rotation
Copied to Clipboard
<html> <head> <script type="importmap"> { "imports": { "vue": "https://unpkg.com/vue@3/dist/vue.esm-browser.js" } } </script> <body> <div id="app"> <h3>Vue Js Check if array of Object contains value</h3> <p v-if="demoObject.length === 0 ">No Object property is available</p> <p v-else v-for="obj in demoObject">{{obj}}</p> </div> <script type="module"> import { createApp } from "vue"; createApp({ data() { return { demoObject:[ {fruit:'Apple',price:'134'}, {fruit:'Orange',price:'131'}, {fruit:'Banana',price:'124'} ], } }, }).mount("#app"); </script> </body> </head> </html>