Skip to content
This repository has been archived by the owner on Jan 10, 2022. It is now read-only.

Select where item is in array #13

Open
jeyemwey opened this issue Jul 20, 2015 · 0 comments
Open

Select where item is in array #13

jeyemwey opened this issue Jul 20, 2015 · 0 comments

Comments

@jeyemwey
Copy link

I got the following table with blog posts:

[  
  {  
    "title": "A post",
    "slug": "a-post",
    "content": "...Lorem ipsum dolor sit amet, consectetur adipisicing...",
    "tags": [  
      "Android",
      "App Tipp",
      "Twitter"
    ]
  },
  {  
    "title": "Another post",
    "slug": "another-post",
    "content": "...ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderi...",
    "tags": [  
      "Android",
      "App Tipp"
    ]
  }
]

For my application, I'd like to select any post that has the tag "Twitter" (or anything else). Since I have several hundreds of sets, I do not want to select all and ask each one of the posts if they had this tags..

Can you build a method that looks for array items?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant