I've been working on a layout library. it is broken up into panels object. I need to search the nested elements for an id and insert data before or after the target element. I can use splice to place the new element but what I can't work out how is search the obj. If posible I would prefer not to use an external library.
any advice or help with this would be very much appreciated
here is an example of a panel object
panel['menu'] = 
{
"id":"menu",
"css":"panel",
"floating":true,
"elements":[{
           "id":"menu-header",
           "html":"<h1 class=\"header\">Loading</h1>",
           "index":0,
           "sib_count":1
           }]
};
 
     
    