Set and get JSON from elements (e.g. form)