Hi I have an array of Objects of following type:
var person = [{
"country" : "United States",
"firstName/per/one" : "John",
"lastName/per" : "Doe",
"age/per" : 50,
"eyeColo/per" : "blue"
},{
"firstName/per" : "james",
"lastName.per" : "bond",
"age_per" : 50,
"eyeColo/per.xyz" : "blue"
}];
My requirement is to remove all those "key:value" pairs in which the key has any slashes (/) in it. So if we take above array of objects my required output is as follows:
var person = [{
"country" : "United States"
},{
"lastName.per" : "bond",
"age_per" : 50
}];
In short need to remove elements having a specific pattern in its keys (that patern in above array of objects is "/")
Thanks