I am looking for a solution to remove occurrences of the object key y_ and achieve an output similar to useroutput
:
var user =[{"data":"2","y_data1":1},{"data":"4","y_data1":3,"y_data2":3}]
var useroutput=[{"data":"2","data1":1},{"data":"4","data1":3,"data2":3}]
If you know of any methods using lodash or plain JavaScript, please share them with me.