I have a json file and I need to look for similar values in both columns. For the JSON, It has 5,000 rows so I don't think looping to each is the right way. My json looks like this:
{
"code": "8485",
"title": "A BAD DREAM",
"artist": "KEANE"
},
{
"code": "50957",
"title": "A BIG HUNK O' LOVE",
"artist": "ELVIS PRESLEY"
},
{
"code": "55481",
"title": "A BLUE GUITAR",
"artist": "TANYA TUCKER"
},
For example, I will look for things that has the letter 'B', it should look those that contain a letter 'B' for both the title and artist.
So what I did was converting the JSON to a multidimensional array. And I can't make the array_filter work with a multidimensional array.