Back

Filter List of String

  • 0
  • Flutter
irfan
26 Dec, 2023, 16:02

Hi @Drake , I have a list of String like: { "ItemList":['Mobile','Home Applinces','Headphones' ] } I need to filter the ItemList if a it has Mobile then i need to apply Query.equal. I tried the like Query.equal('ItemList', [selectedItem]). But it didn't worked out. kindly help me on this ASAP

TL;DR
The user is trying to filter a list of strings, but their attempt using Query.equal() is not working. They are looking for alternative solutions.
ideclon
26 Dec, 2023, 16:11

This whole array is inside one String field?

irfan
26 Dec, 2023, 16:12

yes String as array

irfan
26 Dec, 2023, 16:13

Like this @ideclon

ideclon
26 Dec, 2023, 16:14

Oh, I see. Yeah, I don’t think that’s possible.

ideclon
26 Dec, 2023, 16:15

And please don’t ping people. You can reply to a message and the person you’re replying to will get pinged, but please don’t just tag people.

ideclon
26 Dec, 2023, 16:16

Especially if they’re not involved in the discussion already.

irfan
26 Dec, 2023, 16:16

sorry for that

irfan
26 Dec, 2023, 16:16

don't we have any other possibilities to do so

ideclon
26 Dec, 2023, 16:18

To do what?

irfan
26 Dec, 2023, 16:19

to filter the Array String

ideclon
26 Dec, 2023, 16:21

Get it to your code and then do it there

LDs_Group
27 Dec, 2023, 04:44

Filter array is native in Appetite like Query.equal('title', ['Avatar', 'Lord of the Rings']) in the docs. Maybe a issue.

Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more