Hi All ,
I have a question related to JSON sorting
I have a below structure stored in cassandra and i would like to get the
internal array sorted by a property when i select it , Please let me know
if there is way to do that .

I need to sort the rules Array by property ruleOrder when i select

CREATE TYPE IF NOT EXISTS Rule (  condition text,  action text,  ruleOrder
int);

INSERT INTO model.RuleSetSchedule JSON ' {
    ruleSetName": "RATES",
    "ruleSetId": "829aa84b-4bba-411f-a4fb-38167a987cda",
    "scheduleId":1,
    "effectiveStartDate": "2015-02-01 00:00:00",
    "effectiveEndDate": "2015-03-01 00:00:00",
    "rules": {
        "1": {
            "condition": "BoardStation ==''Lowell''",
            "action": "FareAmount=9.25",
           * "ruleOrder": 2*
        }
 "2": {
            "condition": "BoardStation ==''Lowell''",
            "action": "FareAmount=9.25",
           * "ruleOrder": 1*
        }

    }
}';

Reply via email to