0
let newResult = {};
result.forEach(info => {
  for(const item in info){
    if(info[item].toLowerCase() == value){
      newResult.item = info[item];
    }
  }
})

console.log(newResult)

I want to make an object from another object and for this reason, this item should be dynamic instead of a static string. Any help?

wahwahwah
  • 3,254
  • 1
  • 21
  • 40
Suhail Habib
  • 1
  • 1
  • 1
  • Could you add the code snippet and delete the image link please? You can do that through surrounding your code with ``` ``` – Ikdemm Sep 17 '21 at 19:27
  • *"Any help?"* - Help with **what**, specifically? In what way does your code not work as expected? – David Sep 17 '21 at 19:28
  • Can we have a look at the object structure please? also the result of the `console.log()` and the result you need. We will be able to provide with the solution then. – Ikdemm Sep 17 '21 at 19:28

0 Answers0