I don't know if this thing exists or if a best practices already exists.
I have a json string and I would like to know if it's possible to extract data from this json using a query string like in sql.
Example with this json:
[
{
"user": [
{
"id": 1,
"name": "Smith",
"visits": [
{
"id": 1,
"date": "2016-08-30 16:00:00",
"pageViews": 18
}
]
},
{
"id": 2,
"name": "Willis",
"visits": [
{
"id": 2,
"date": "2016-08-30 18:00:00",
"pageViews": 34
}
]
}
]
}
]
If I execute a query like SELECT user.name WHERE user.visits.pageViews > 20 I get Willis
Else, what is the best way to do something like that in PHP ?
Thanks
jq? Also explain structure language?