I have Json Object
0:Object
$id:"1"
MetricValue:83
GeoValue:"EAST"
DimensionValue:High
DocCount:28
1:Object
$id:"2"
MetricValue:97
GeoValue:"SOUTH"
DimensionValue:Medium
DocCount:28
2:Object
$id:"3"
MetricValue:90
GeoValue:"West"
DimensionValue:High
DocCount:30
3:Object
$id:"4"
MetricValue:50
GeoValue:"NORTH"
DimensionValue:Medium
DocCount:30
Now i would like to divide this object into two objects based on the MetricValue property,
i.e.
I want group the objects with MetricValue >= 80 into one object and those < 80 into another object.
The above object would be divided into
Object1
0:Object
$id:"1"
MetricValue:83
GeoValue:"EAST"
DimensionValue:High
DocCount:28
1:Object
$id:"2"
MetricValue:97
GeoValue:"SOUTH"
DimensionValue:Medium
DocCount:28
2:Object
$id:"3"
MetricValue:90
GeoValue:"West"
DimensionValue:High
DocCount:30
Object2
0:Object
$id:"1"
MetricValue:50
GeoValue:"NORTH"
DimensionValue:Medium
DocCount:30