jsoneditor example: fix append or replace at the end of an array