How can I query and list according to the array in the array in React Native Realm?
I have such data.
[
{
"id": "6407d4949096750f578c536c",
"name": "name1",
"data": [
{ "label": "1", "text": "text1" },
{ "label": "1", "text": "text2" },
{ "label": "2", "text": "text3" },
{ "label": "2", "text": "text4" },
]
},
{
"id": "7407d4949096750f578c536c",
"name": "name2",
"data": [
{ "label": "1", "text": "text1" },
{ "label": "2", "text": "text2" },
{ "label": "2", "text": "text3" },
{ "label": "2", "text": "text4" },
]
}
]
Here I want to filter and list like label == 1. Just like in this example. How can I do that?
[
{
"id": "6407d4949096750f578c536c",
"name": "name1",
"data": [
{ "label": "1", "text": "text1" },
{ "label": "1", "text": "text2" },
]
},
{
"id": "7407d4949096750f578c536c",
"name": "name2",
"data": [
{ "label": "1", "text": "text1" },
]
},
]