        END
   FROM array_lower("key_path", 1) l,
        array_upper("key_path", 1) u
-$function$;
+$function$;;
 
 UPDATE election SET configuration=json_object_set_path(configuration::json,'{presentation,share_text}',cast(concat('[{"network":"Twitter","button_text":"","social_message":"', configuration::json->'presentation'->>'share_text', '"}]') AS json));
 

         WHERE "key" <> "key_to_set"
         UNION ALL
        SELECT "key_to_set", to_json("value_to_set")) AS "fields"
$function$;



CREATE OR REPLACE FUNCTION "json_object_set_path"(
  "json"          json,

         WHERE "key" <> "key_to_set"
         UNION ALL
        SELECT "key_to_set", to_json("value_to_set")) AS "fields"
$function$;;

CREATE OR REPLACE FUNCTION "json_object_set_path"(
  "json"          json,
