Question: I have a json response in the form : 

```
some_array = [{
ios: "110"
rate_pl: "PlanC"
ref_site: "N/A"
reservation_id: "12709034"
},{
ios: "121"
rate_pl: "SomePlan"
ref_site: "FB"
reservation_id: "1273034
},{
ios: "141"
rate_pl: "PlanC"
ref_site: "Tweet"
reservation_id: "143034
}];

```

How do i group a particular attribute say 'rate\_pl' and also add the values if the ios which related to that particular rate\_pl.

example --> Result should be:

```
someObject = [
    {PlanC: ['ios':251]},              //(110+141 = 251)
    {SomePlan: ['ios':121]}
    ]; 

```

Answer: 
I can only guess, but in C this was an idiom to define named integer constants without resorting to using #define.
It is better to do it like this instead of having #define FIRST\_DAY 0.
Also it's now possible to extend it if necessary.