<html lang="en">
<head>
<script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
</head>
<body>
<div id="app">
<p>Base64 strings: {{ base64Strings }}</p>
<p>JSON objects: {{ jsonObjects }}</p>
</div>
<script type="module">
const app = new Vue({
el: "#app",
data() {
return {
base64Strings: [
'eyJpZCI6MSwiYWdlIjozMH0=',
'eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ=='
],
jsonObjects: null
};
},
mounted() {
this.jsonObjects = this.base64Strings.map(base64String => {
return this.decodeBase64(base64String);
});
},
methods: {
decodeBase64(base64String) {
const jsonString = atob(base64String);
return JSON.parse(jsonString);
}
}
})
</script>
<style scoped>
#app {
background-color: #f8f8f8;
border: 1px solid #ddd;
padding: 20px;
border-radius: 5px;
box-shadow: 0px 0px 5px rgba(0, 0, 0, 0.1);
}
#app p {
margin: 0;
font-size: 18px;
line-height: 1.6;
color: #333;
}
#app p:first-child {
font-weight: bold;
margin-bottom: 10px;
}
</style>
</body>
</html>