I am facing an issue where I cannot retrieve the dynamic key pair value from the dynamic JSON. Below is my JSON:
var d = {
"pexels-photo.jpeg": {
"information": "laptop",
"desc": {
"mimetype": "image/jpeg",
"id": "shsj44",
"file_id": "pexels-photo.jpeg"
},
"_id": "shsj44"
}
}
Here, I have attempted the following:
Object.keys(d).forEach(function(key){
var value = d[key];
console.log(key + ':' + value) ;
});
I am looking to extract the values of the id "_id" and "file_id".