jeudi 25 août 2016

How select data with given condition

I have following data.

{

    "name" : "Maria",
    "facebook" : [
        {
            "data" : "fb.com",
            "privacy" : true
        }
    ],
    "twitter" : [
        {
            "data" : "twitter.com",
            "privacy" : false
        }
    ],
    "google" : [
        {
            "data" : "google.com",
            "privacy" : true
        }
    ],
    "phno" : [
        {
            "data" : "+1-1289741824124",
            "privacy" : true
        }
    ]
}

I want to return only data having privacy is equal to true. How do I do it ?

I tried but it returns all data having privacy is equal to false.

Thanks!

Aucun commentaire:

Enregistrer un commentaire