class JsonUtils {

    public Map<String, String> entryArrayToMap(DelegateExecution execution, String entryArray, String keyNode,
            String valueNode) {
        logger.debug("Started Entry Array To Map Util Method");

        Map<String, String> map = new HashMap<>();
        // Populate Map
        String entryListJson = "{ \"wrapper\":" + entryArray + "}";
        JSONObject obj = new JSONObject(entryListJson);
        JSONArray arr = obj.getJSONArray("wrapper");
        for (int i = 0; i < arr.length(); i++) {
            JSONObject jo = arr.getJSONObject(i);
            String key = jo.getString(keyNode);
            String value = jo.get(valueNode).toString();
            map.put(key, value);
        }
        logger.debug("Completed Entry Array To Map Util Method");
        return map;
    }

}