I have a JSON string as follows:
var empJSON = {
"Emp1":{
id:"emp123124",
name:"xyz"
},
"Emp2":{
id:"emp12654",
name:"abx"
}
};
The structure of JSON is fixed.
I want to fetch the current object which has a specific id.
e.g. The Emp1 object where id is "emp123124".
How can I do this easily using lodash?