qarray icon indicating copy to clipboard operation
qarray copied to clipboard

query multidimensional array

Open Parviz-Elite opened this issue 5 years ago • 2 comments

hi, first of all thanks for this great work.

My array looks like the below template.

now i want to get items that has this conditions: 'type' = 'SupportPackage' and 'meta.object' = 'Product' and 'meta.objectID' = 1

is there any way to do that? or it's require new feature?

array(6) { ["32bb717316eaf47ca2dc66a37091055b"]=> array(11) { ["id"]=> int(1) ["type"]=> string(7) "Product" ["title"]=> string(12) "Product 1" ["meta"]=> array(0) { } } ["28f77aee510f2bfd193727b89a223be3"]=> array(11) { ["id"]=> int(2) ["type"]=> string(7) "Product" ["title"]=> string(12) "Product 2" ["meta"]=> array(0) { } } ["fb55f404f0b6ca3591dc01239d2cd5bc"]=> array(11) { ["id"]=> int(3) ["type"]=> string(7) "Product" ["title"]=> string(24) "Product 3" ["meta"]=> array(0) { } } ["23b687c40f8ed7e064d2e07258119cc5"]=> array(11) { ["id"]=> int(1) ["type"]=> string(14) "SupportPackage" ["title"]=> string(22) "SupportPackage 1" ["meta"]=> array(3) { ["object"]=> string(7) "Product" ["objectID"]=> int(1) ["parent"]=> string(32) "32bb717316eaf47ca2dc66a37091055b" } } ["73d33e59e64821177e89840e34a1c595"]=> array(11) { ["id"]=> int(2) ["type"]=> string(14) "SupportPackage" ["title"]=> string(38) "SupportPackage 2" ["meta"]=> array(3) { ["object"]=> string(7) "Product" ["objectID"]=> int(5) ["parent"]=> string(32) "28f77aee510f2bfd193727b89a223be3" } } ["1539558d6af61dbe46fa35b10b62163d"]=> array(11) { ["id"]=> int(1) ["type"]=> string(14) "SupportPackage" ["title"]=> string(22) "SupportPackage 1" ["meta"]=> array(3) { ["object"]=> string(7) "Product" ["objectID"]=> int(6) ["parent"]=> string(32) "fb55f404f0b6ca3591dc01239d2cd5bc" } } }

Parviz-Elite avatar Oct 20 '20 10:10 Parviz-Elite

never mind, my friend found it, he use dot in where, like where('meta.object', 'Product')

Parviz-Elite avatar Oct 20 '20 11:10 Parviz-Elite

Please share the exact json data

nahid avatar Oct 20 '20 15:10 nahid