I filtering group of object like this:
[
{
"Username":"00d9a7f4-0f0b-448b-91fc-fa5aef314d06",
"Attributes":[
{
"Name":"custom:organization",
"Value":"zxc"
},
{
"Name":"sub",
"Value":"00d9a7f4-0f0b-448b-91fc-fa5aef314d06"
},
{
"Name":"email_verified",
"Value":"false"
},
{
"Name":"email",
"Value":"zigor@freeallapp.com"
}
],
"UserCreateDate":"2021-02-04T17:59:28.212Z",
"UserLastModifiedDate":"2021-02-04T17:59:28.212Z",
"Enabled":true,
"UserStatus":"UNCONFIRMED"
},
{
"Username":"07c16a30-b994-4267-9794-6fb20739abeb",
"Attributes":[
{
"Name":"custom:organization",
"Value":"asd"
},
{
"Name":"sub",
"Value":"07c16a30-b994-4267-9794-6fb20739abeb"
},
{
"Name":"email_verified",
"Value":"false"
},
{
"Name":"email",
"Value":"2marwan.khatar.39@dankq.com"
}
],
"UserCreateDate":"2021-02-04T17:56:13.787Z",
"UserLastModifiedDate":"2021-02-04T17:56:13.787Z",
"Enabled":true,
"UserStatus":"UNCONFIRMED"
},
Following is filtering fine
let filterarry;
filterarry = jsonObject.filter(Attributes => {
return Attributes.Enabled == true && Attributes.UserStatus == 'UNCONFIRMED';
});
console.log(filterarry);
I am trying to filter by Attributes having: Attributes that have custom:organization and with value zxc how can I do that ??
"Attributes":[
{
"Name":"custom:organization",
"Value":"zxc"
},
I tried few methods but i am getting empty array in output Thanks