[
{
"Location":"DLI",
"20FR":"0",
"20GP":"6",
"20HC":"0",
"20HD":"0",
"20OT":"0",
..,,
..,,
"Total":"7",
"Cost":"251500.000"
},
{
"Location":"LKCMB",
"20FR":"0",
"20GP":"0",
"20HC":"0",
"20HD":"0",
"20OT":"0",
..,,
..,,
"Total":"9",
"Cost":"360000.000"
},
{
"Location":"MAA",
"20FR":"0",
"20GP":"12",
"20HC":"0",
"20HD":"0",
"20OT":"1",
..,,
..,,
"Total":"20",
"Cost":"1041183.000"
}
etc.,
]
i have json output as given above, now i need to filter this json based on key value. for example in this above json 20FR is 0 in each array so i need to filter it , 20GP is not having 0 in all array so no need to filter this one, again 20HC and 20HD are 0 in all and have to filter again 20OT is not 0 in one array so no need to filter like i have to filter the json. please someone help me. this is what expecting output.
[
{
"Location":"DLI",
"20GP":"6",
"20OT":"0",
..,,
..,,
"Total":"7",
"Cost":"251500.000"
},
{
"Location":"LKCMB",
"20GP":"0",
"20OT":"0",
..,,
..,,
"Total":"9",
"Cost":"360000.000"
},
{
"Location":"MAA",
"20GP":"12",
"20OT":"1",
..,,
..,,
"Total":"20",
"Cost":"1041183.000"
}
etc.,
]
please someone help me how to do this in php or jquery or javascript. Thank you