@Nonnull
    public static Object getValue(@Nonnull final JsonObject object,
                                  @Nonnull final String path) throws ParsingException {

        final List<String> keys = Arrays.asList(path.split("\\."));
        final JsonObject parentObject = getObject(object, keys.subList(0, keys.size() - 1));
        if (parentObject == null) {
            throw new ParsingException("Unable to get " + path);
        }

        final Object result = parentObject.get(keys.get(keys.size() - 1));
        if (result == null) {
            throw new ParsingException("Unable to get " + path);
        }
        return result;
    }
@Test
    public void testGetValueNested() throws JsonParserException, ParsingException {
        JsonObject obj = JsonParser.object().from("{\"name\":\"John\",\"age\":30,\"cars\":{\"car1\":\"Ford\",\"car2\":\"BMW\",\"car3\":\"Fiat\"}}");
        assertTrue("BMW".equals(JsonUtils.getValue(obj, "cars.car2")));
    }