Creating json on Save click - metadata frontend