I've been trying to use the approach suggested by another SO-User: https://stackoverflow.com/a/1820837/1324861
But without luck. Basically, I have a large JSON Object that I transformed into a string using JSON.stringify()
in order to execute a regexp pattern against. My idea is to return everything between { }
if my search term "soccer" is found anywhere between the curly braces.
My data could look like this:
{
{
User: "Peter",
Hobbies: "Soccer, Football, ...",
more...
},
{
User: "Simon",
Hobbies: "Pingpong, Soccer, Badminton",
more...
}
}
So if I searched for 'soccer' in my stringified JSON Object I'd like to get back the entire info on the user. How can I do this?