I want to rename json objects’ keys in Node.js(or JavaScript). Like how we use @JsonProperty to rename in java is there something equivalent in JavaScript to do the same?
I wrote the following code in java to change the keys’ name(from caps to camel case) of a json object.
public class Rename {
@JsonProperty("STUDENT_ID")
private String studentId;
@JsonProperty("STUDENT_NAME")
private String studentName;
}
I want to do the same in Node.js. Is there any annotation or any methods available to do it?