I have an array of strings like
let arr = ["id", "photos[0]"]
And source object like
let obj = {
  id: 111,
  name: "nick",
  photos: [{photo1: tbd},{photo2: tbd}]
}
And i need to filter this obj by given strings to get new obj
{id: 111, photos: {photo1: tbd}}
any elegant solutions?
 
    