Advertisement
Guest User

Untitled

a guest
Dec 19th, 2014
159
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.  formulas.extractKey=function(obj,key){
  2.             for(key1 in obj){
  3.                 if(key1==key){
  4.                     return obj[key1];
  5.                 }
  6.                 if(_.isObject(obj[key1])){
  7.                     var val=formulas.extractKey(obj[key1],key);
  8.                     if(val!=null) return val;
  9.                 }
  10.             }
  11.             return null;
  12.         };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement