0👍
When you alert or print an object JS tries to turn it into a string so that’s why it’s printing "[object Object]". Obviously this isn’t very useful, but you should be able to alert(projectData.id) or alert(projectData.project), as those are the actual individual params that you passed.
- [Vuejs]-Disable own back button when about to leave the site? (not the browser implemented one)
- [Vuejs]-Nuxt fetch method, if API error make whole site respond with 404 error
0👍
Try to use console.log(projectData) instead of alert, when you work with objects. It will be easier to get around and figure out how to access object properties.
Source:stackexchange.com