public static Map<String, Object> getFlattenedMap(Map<String, Object> source) {
        Map<String, Object> result = new LinkedHashMap<>();
        buildFlattenedMap(result, source, null);
        return result;
    }
@Test
    public void testGetFlattenedMap() {
        Map<String, Object> source = new HashMap<>();
        source.put("map", Collections.singletonMap("key", "abc"));
        source.put("list", Collections.singletonList(123));

        Map<String, Object> result = new LinkedHashMap<>();
        result.put("list[0]", 123);
        result.put("map.key", "abc");

        Map<String, Object> map = MapUtil.getFlattenedMap(source);
        Assertions.assertEquals(result, map);
    }