I am trying to get all the keys from an object in Vue.
I already know to do this in JavaScript. i.e;
const object1 = {
a: 'somestring',
b: 42,
c: false
};
console.log(Object.keys(object1));
The output would be an array.
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/keys
How would you do this in a methods in Vue ?
methods: {
getKeys(object1){
...
},
},
And explain how would you confront other differences like this ?