IBM / JSONata4Java

Open Source Java version of JSONata
Apache License 2.0
88 stars 36 forks source link

Orderby using numeric values does not work #271

Closed dankristensen closed 1 year ago

dankristensen commented 1 year ago

I have added this test to OpOrderByTest.java:

    @Test
    public void testOrderedNumeric() throws Exception {
        test("$^(id, content)",
                "[{\"id\":1,\"content\":\"1\"},{\"id\":2,\"content\":\"1\"},{\"id\":2,\"content\":\"2\"}]", null,
                "[{\"id\":2,\"content\":\"2\"},{\"id\":2,\"content\":\"1\"},{\"id\":1,\"content\":\"1\"}]");
    }

When executing this, it fails, but should actually pass. It is a copy of testOrdered test, with only the id value being changed from string to number

wnm3 commented 1 year ago

Thanks -- I've released version 2.4.3 -- it should hit Maven Central in a couple of hours 9:54am ET You can close once you've tested. Thanks very much for the fix!