0👍
✅
It’s better to create just one dict.
axios.get('/api/sites/hero').then(response => {
this.heros = {}
let self = this;
response.data.map(obj => {
self.heros[obj.name] = obj.value;
return obj;
})
}).catch(function (handleError) {
console.log("Error: ", handleError);
}, []);
{sub_title: 'The Best Developer Team', title: 'We Are the Brilliants Creative Secure Maintain Build in Terms of website Development', description: 'End-to-end payments and website management in a si…le solution. Meet the right team to help realize.', button_text: 'Get Started', video_text: 'How We Works', video_url: '#video', url: '/frontend/assets/img/hero/1667138531.png', image: '1667138531.png'}
It will create dict like this and you can then direct access
heros.title
Source:stackexchange.com