{ methods: { containsKey(obj, key ) { return Object.keys(obj).includes(key); } }, computed: { hasName() { return this.containsKey(this.someObject, 'name'); } } }