I have an object that contains objects. How do i filter out the value of "title" based on whether the id is matching?
{
"0": {
"id": 1912,
"title": "Fiction",
},
"1": {
"id": 1957,
"title": "Non-Fiction",
},
"2": {
"id": 1958,
"title": "Literature",
},
}
For example, if the const id=1958, then the output: Literature
Output:
Literature