1👍
To get fields of an object, you can use Object.keys(your_object)
or Object.entries(your_object)
. This should work even when you are getting your types dynamically from the Pinia Store.
Example:
const obj = {a: 1, b: "Hello"}
Object.entries(obj)
// [[ "a", 1 ], [ "b", "Hello" ]]
- [Vuejs]-Vue js component with nested data
- [Vuejs]-Pass select option value to input field using VueJS
Source:stackexchange.com