Directive to edit any JSON object in angular