Currently, my goal is to retrieve the email property from the user object
{"name":"test", "email":"<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="582c3d2b2c182c3d2b2c7620">[email protected]</a>"}
I want to achieve this using the following code snippet:
<input type="text" :placeholder="user.email">
When I attempt to access the property using console -> console.log(user.email), everything appears to be working smoothly
Below is the component code:
<template>
<div>
<form method="POST" action="smth.php">
<input type="text" :placeholder="user.email">
</form>
</div>
</template>
<script>
export default {
props: {
user: {
type: Object,
required: true
}
},
}
</script>
The component call is as follows:
<div class="container">
<page-profile :user="{{ $user->toJson() }}"></page-profile>
</div>
Could you kindly guide me in the correct approach to accessing the email property of the user object?
Both the console and npm watch do not report any errors.