function digStateInBlockStatement(obj) {
  if (obj.type !== 'BlockStatement') return;
  let ret = {};
  obj.body.forEach((element) => {
    if (element.type === "ExpressionStatement" && element.expression.type === "AssignmentExpression")
      if (element.expression.left.property.name === 'state') {
        if (element.expression.right.type === "ObjectExpression"){
           element.expression.right.properties.forEach(elem => {
            //  ret[elem.key.name] = elem.value.value;
            ret[elem.key.name] = parseNestedObjects(elem)
            // console.log('parseNestedObjects return value', parseNestedObjects(elem))
          });
        }
      }
  });
  // console.log('return' ,ret)
  return ret;
 }
traverses through AST BlockStatement object and returns the state of Component;
@param {*} obj