Below the input object send to api
var inputArray = {
...inputArray,
data:{
...inputArray.data,
firstName:'',
secondOne:'',
Third:'',
Last-Name:'',
}
};
var firstName = response[0].firstName;
var secondOne = response[0].secondOne;
var Third = response[0].Third;
var lastName = response[0].lastName;
assign the values to input object
inputArray.data.firstName = firstName;
inputArray.data.secondOne = secondOne;
inputArray.data.Third = Third;
inputArray.data.Last-Name = lastName;
lastname input object contains inputArray.data.Last-Name = lastName;
hyphen ,when i try to send like above showing error.how to send hyphen input parameters to api