I need to use a code like this:
vr1 = 'firstName'
value1 = 'Fred'
vr2 = 'lastName'
value2 = 'Flinstone'
axios({
method: 'post',
url: '/user/12345',
data: {
vr1: Value1,
vr2: Value2
}
});
so, it will be the same as executing:
axios({
method: 'post',
url: '/user/12345',
data: {
firstName: 'Fred',
lastName: 'Flintstone'
}
});
Is this possible using Java Script 6?