javascript find by value deep in a nested object/array
问题 hello , I have a problem returning an object in my function, Let's say I have an object: var elements = [{ "fields": null, "id_base": "nv_container", "icon": "layout", "name": "container", "is_container": true, "elements" : [ //another elements set here ] }, { "id_base": "novo_example_elementsec", "name": "hello", "icon": "edit", "view": {} }]; what i want is a function (in pure javascript) that can find an object with a specific key and value , and i have created a function but its just not