Currently, I am attempting to change my array key value from a string to a number within my JSON object:
form["price"] == "23"
console.log(typeof form["price"]) // string
form["price"] == Number(parseFloat(this.formObject[field.fieldName]))
The issue arises after this conversion, resulting in different types :
console.log(Number(parseFloat(this.formObject[field.fieldName]))) // number
console.log(form["price"]) // string, should be number
How can the key type be modified? This difficulty is affecting the backend validation of my DTO.