manual merge of JSONArray